Need help with sumo-rl?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

135 Stars 47 Forks MIT License 84 Commits 2 Opened issues


A simple interface to instantiate Reinforcement Learning environments with SUMO for Traffic Signal Control. Compatible with Gym Env from OpenAI and MultiAgentEnv from RLlib.

Services available


Need anything else?

Contributors list

No Data

Project Status: Active – The project has reached a stable, usable state and is being actively developed. License


SUMO-RL provides a simple interface to instantiate Reinforcement Learning environments with SUMO for Traffic Signal Control.

The main class SumoEnvironment inherits MultiAgentEnv from RLlib.
If instantiated with parameter 'single-agent=True', it behaves like a regular Gym Env from OpenAI.
TrafficSignal is responsible for retrieving information and actuating on traffic lights using TraCI API.

Goals of this repository: - Provide a simple interface to work with Reinforcement Learning for Traffic Signal Control using SUMO - Support Multiagent RL - Compatibility with gym.Env and popular RL libraries such as stable-baselines3 and RLlib - Easy customisation: state and reward definitions are easily modifiable


Install SUMO latest version:

sudo add-apt-repository ppa:sumo/stable
sudo apt-get update
sudo apt-get install sumo sumo-tools sumo-doc 

Don't forget to set SUMOHOME variable (default sumo installation path is /usr/share/sumo) ``` echo 'export SUMOHOME="/usr/share/sumo"' >> ~/.bashrc source ~/.bashrc ```

Install SUMO-RL

Stable release version is available through pip

pip install sumo-rl

Alternatively you can install using the latest (unreleased) version

git clone
cd sumo-rl
pip install -e .


Check experiments to see how to instantiate a SumoEnvironment and use it with your RL algorithm.

Q-learning in a one-way single intersection:

python3 experiments/ 

RLlib A3C multiagent in a 4x4 grid:

python3 experiments/

stable-baselines3 DQN in a 2-way single intersection:

python3 experiments/

Plotting results:

python3 outputs/ -f outputs/2way-single-intersection/a3c 

alt text


If you use this repository in your research, please cite:

    author = {Lucas N. Alegre},
    title = {SUMO-RL},
    year = {2019},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{}},

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.