Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Reinforcement Learning environments for Traffic Signal Control with SUMO. Compatible with Gymnasium, PettingZoo, and popular RL libraries.
| Date | Stars |
|---|---|
| 2026-07-24 | 1064 |
| 2026-07-25 | 1064 |
| 2026-07-28 | 1064 |
| 2026-07-30 | 1064 |
| 2026-07-31 | 1065 |
| 2026-08-02 | 1067 |
| 2026-08-04 | 1066 |
| 2026-08-05 | 1068 |
| 2026-08-06 | 1069 |
Today
+1 stars today
This week
+5 stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.47%/day
<img src="docs/_static/logo.png" align="right" width="30%"/>
[](https://zenodo.org/doi/10.5281/zenodo.10869789)
[](https://github.com/LucasAlegre/sumo-rl/actions/workflows/linux-test.yml)
[](https://badge.fury.io/py/sumo-rl)
[](https://pre-commit.com/)
[](https://github.com/psf/black)
[](https://github.com/LucasAlegre/sumo-rl/blob/main/LICENSE)
# SUMO-RL
<!-- start intro -->
SUMO-RL provides a simple interface to instantiate Reinforcement Learning (RL) environments with [SUMO](https://github.com/eclipse/sumo) for Traffic Signal Control.
Goals of this repository:
- Provide a simple interface to work with Reinforcement Learning for Traffic Signal Control using SUMO
- Support Multiagent RL
- Compatibility with gymnasium.Env and popular RL libraries such as [stable-baselines3](https://github.com/DLR-RM/stable-baselines3) and [RLlib](https://docs.ray.io/en/main/rllib.html)
- Easy customisation: state and reward definitions are easily modifiable
The main class is [SumoEnvironment](https://github.com/LucasAlegre/sumo-rl/blob/main/sumo_rl/environment/env.py).
If instantiated with parameter 'single-agent=True', it behaves like a regular [Gymnasium Env](https://github.com/Farama-Foundation/Gymnasium).
For multiagent environments, use [env](https://github.com/LucasAlegre/sumo-rl/blob/main/sumo_rl/environment/env.py) or [parallel_env](https://github.com/LucasAlegre/sumo-rl/blob/main/sumo_rl/environment/env.py) to instantiate a [PettingZoo](https://github.com/PettingZoo-Team/PettingZoo) environment with AEC or Parallel API, respectively.
[TrafficSignal](https://github.com/LucasAlegre/sumo-rl/blob/main/sumo_rl/environment/traffic_signal.py) is responsible for retrieving information and actuating on traffic lights using [TraCI](https://sumo.dlr.de/wiki/TraCI) API.
For more details, check the [documentation online](https://lucasalegre.github.io/sumo-rl/).
<!-- end intro -->
## Install
<!-- start install -->
### Install SUMO latest version:
```bash
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 SUMO_HOME variable (default sumo installation path is /usr/share/sumo)
```bash
echo 'export SUMO_HOME="/usr/share/sumo"' >> ~/.bashrc
source ~/.bashrc
```
Important: for a huge performance boost (~8x) with Libsumo, you can declare the variable:
```bash
export LIBSUMO_AS_TRACI=1
```
Notice that you will not be able to run with sumo-gui or with multiple simulations in parallel if this is active ([more details](https://sumo.dlr.de/docs/Libsumo.html)).
### Install SUMO-RL
Stable release version is available through pip
```bash
pip install sumo-rl
```
Alternatively, you can install using the latest (unreleased) version
```bash
git clone https://github.com/LucasAlegre/sumo-rl
cd sumo-rl
pip install -e .
```
<!-- end install -->
## MDP - Observations, Actions and Rewards
### Observation
<!-- start observation -->
The default observation for each traffic signal agent is a vector:
```python
obs = [phase_one_hot, min_green, lane_1_density,...,lane_n_density, lane_1_queue,...,lane_n_queue]
```
- ```phase_one_hot``` is a one-hot encoded vector indicating the current active green phase
- ```min_green``` is a binary variable indicating whether min_green seconds have already passed in the current phase
- ```lane_i_density``` is the number of vehicles in incoming lane i dividided by the total capacity of the lane
- ```lane_i_queue```is the number of queued (speed below 0.1 m/s) vehicles in incoming lane i divided by tExcerpt of 11,652 characters
Read on GitHubLucas Alegre · Institute of Informatics - UFRGS · Brazil
209
Jordan Terry
5
4
3
Beñat Sagarzazu
3
Ariel Kwiatkowski · Apple · Switzerland
2
2
1
Michal Gregor · Kempelen Institute of Intelligent Technologies; University of Zilina
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:b568a0cd5196d105, topic:reinforcement-learning, topic:deep-reinforcement-learning, topic:gymnasium