mschrader15 / reinforcement-learning-sumo

Reinforcement Learning + traffic microsimulation (via SUMO). Uses Ray RLLIB and forces SUMO into the OpenAI Gym Framework
https://maxschrader.io/reinforcement-learning-and-sumo
45 stars 9 forks source link
openai-gym optimization reinforcement-learning sumo traffic-simulation

Reinforcement Learning + SUMO

Applying reinforcement learning to traffic microsimulation (SUMO)

A minimal example is available in the example folder

Very much a WIP

Structure

This project follows the structure of FLOW closely. I only chose to diverge from FLOW because it abstracted the XML creation for SUMO. For me, this repository plugs in to a greater code-base, that turns real-world ITS data into SUMO traffic demand and traffic light operation. Those tools work ultimately by writing to SUMO XML files, and we didn't want to convert to the FLOW pythonic framework.

Results

Full breakdown: https://maxschrader.io/reinforcement-learning-and-sumo

video on Youtube

ES vs. PPO

RL-Controlled Traffic Signals vs. Calibrated Real-World Simulation

Real World Traffic Signals during Simulation Period

RL-Controlled Traffic Signals during Simulation Period