🚦 Adaptive traffic signal control using Deep Q-Networks (DQN) in SUMO — optimized for Lagos, Nigeria
# 🚦 Lagos Traffic Optimization with Deep Q-Networks (DQN) in SUMO
A Reinforcement Learning model that clears traffic in Lagos 59% faster than traditional systems—tested on real maps using SUMO and Deep Q-Networks.
## Why This Matters
🔥
Lagos traffic isn’t just inconvenient—it’s catastrophic. The Oke Afa Roundabout and Isolo–Mushin Corridor are among the city's most congested intersections. Traditional fixed-timing systems collapse under pressure. This project uses Deep Reinforcement Learning to fix that.
Our DQN-based signal controller outperforms traditional systems, cutting travel time by over 30%, increasing speed by 50%, and completing nearly 2x more trips—all in a realistic SUMO simulation built from actual OSM map data.
## Table of Contents
- Project Goals
- Agents Built
- How It Was Tested
- Performance Highlights
- Demo Video
- Stack and Tools
- Contributing
- What to Do Next
- Author
## Project Goals
🎯
To simulate real-world traffic conditions at multiple intersections, including the Oke Afa Roundabout and adjacent junctions.
- Simulate Lagos traffic at key intersections (Oke Afa Roundabout, Isolo–Mushin) using SUMO.
- Train a Deep Q-Network agent to dynamically adapt traffic signals in real-time.
- Benchmark against Fixed-Time and classical Q-Learning agents.
- Measure speed, throughput, emissions, and travel efficiency.
## Agents Built
đź§
| Agent | Description |
| ---------------------- | -------------------------------------------------------------------------------- |
| âś… **DQN Agent** | Learns traffic light timing via neural networks. Maximizes flow, minimizes wait. |
| ⬜ **Q-Learning Agent** | Table-based RL. Simple but effective baseline. |
| ❌ **Fixed-Time Agent** | Static signal schedule. Old-school, non-adaptive benchmark. |
## How It Was Tested
đź§Ş
- SUMO simulation (command-line, 0.5s s …