Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/themcaffee/road-rage
Use deep learning to set red light timings to optimize throughput
https://github.com/themcaffee/road-rage
Last synced: 26 days ago
JSON representation
Use deep learning to set red light timings to optimize throughput
- Host: GitHub
- URL: https://github.com/themcaffee/road-rage
- Owner: themcaffee
- License: mit
- Created: 2018-09-09T01:54:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T21:32:12.000Z (almost 2 years ago)
- Last Synced: 2023-09-09T16:46:11.057Z (over 1 year ago)
- Language: Python
- Size: 85 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Road Rage
Hate traffic? Me too. Traffic lights should be smarter and controlling
them is a juicy optimization problem. This experiment uses reinforcement
learning to dynamically control stop lights to optimize getting people
where they want to go.## Usage
```
# Install sumo the traffic simulator
sudo apt-get install sumo sumo-tools sumo-doc
export $SUMO_HOME=/usr/share/sumo# Setup and install requirements
python3 -m virtualenv venv
source venv/bin/activate
pip install -r requirements.txt# Run training and evaluation
python run.py
```## Options
```
python run.py --helpUsage: run.py [options]
Options:
-h, --help show this help message and exit
--gui Run the GUI version of sumo
--type=TYPE The type of prediction to use
--training-steps=TRAINING_STEPS
The number of simulation steps to train for
--training-max-steps=TRAINING_MAX_STEPS
The maximum number of steps during training per
episode
--training-warmup=TRAINING_WARMUP
Steps to take randomly before prediction
--eval-episodes=EVAL_EPISODES
Number of episodes to evaluate for
--eval-max-steps=EVAL_MAX_STEPS
Max simulation steps per episode during training
```## Results
Reward (higher is better):
- DQN (trained 200000 epochs): 13027
- random: 6965
- timed: 1495