← All projects

Solo · 2025, re-evaluated Oct 2026 · live replay

Traffic signals with deep reinforcement learning

A PPO agent decides which direction gets green at a simulated four-way intersection in SUMO, and is compared fairly with fixed-time signal plans over five seeds.

What it shows

  • Mean wait of 3.06s per vehicle vs 3.85s for the best of three fixed-time plans tested, on the traffic pattern it trained on.
  • On random arrivals it never saw, it loses (5.48s vs 4.11s), and the write-up says so.
  • Fixed an action-space bug that had the agent choosing between green and yellow instead of between directions.
  • Python
  • PyTorch
  • Stable-Baselines3
  • SUMO
  • Gymnasium

Results

ControllerWait, trained pattern (s)Wait, random arrivals (s)Vehicles through (trained)
PPO3.06 ± 0.075.48 ± 0.16792
Fixed-time 30 s9.12 ± 0.169.27 ± 0.39790
Fixed-time 10 s3.85 ± 0.104.11 ± 0.07792
Fixed-time 42 s14.04 ± 0.1214.03 ± 0.92789

Mean ± standard deviation over seeds 1-5. Source: results/eval_summary.csv

Animation of the PPO agent switching the lights at the simulated intersection
results/figures/ppo_demo.gif
Bar charts of waiting time, queue length and throughput for PPO and three fixed-time plans
results/figures/ppo_vs_fixed_time.png
Training curves: reward and mean waiting time per episode
results/figures/training_curve.png