AI-Powered Adaptive Traffic Signal Optimization for Urban Intersections
Project Description
Problem & Motivation
Urban traffic congestion is one of the most persistent challenges faced by modern cities. In the San Francisco Bay Area alone, commuters spend over 100 hours each year sitting in traffic, resulting in billions of dollars in lost productivity and fuel consumption. Traditional traffic signal controllers typically rely on fixed or actuated timing plans that respond to local vehicle detections but are unable to continuously optimize signal timing under changing traffic conditions.
This project investigates whether Reinforcement Learning (RL) can learn adaptive traffic signal control policies capable of improving traffic flow without increasing congestion. Rather than replacing existing traffic infrastructure, our goal is to demonstrate that AI-driven controllers can leverage real-time traffic observations to dynamically adjust green signal durations, reducing delays while increasing the number of vehicles successfully passing through an intersection.
The project was developed with transportation agencies, traffic engineers, and city planners in mind. Beyond improving travel times, the long-term vision is to provide a scalable framework that can eventually support coordinated traffic management across entire corridors and urban road networks.
Data Source & Data Science Approach
The project combines real-world transportation data with microscopic traffic simulation and reinforcement learning.
The road network was obtained from OpenStreetMap and imported into the Simulation of Urban Mobility (SUMO), an open-source microscopic traffic simulator widely used in transportation research. Traffic signal layouts and road topology were extracted automatically, while traffic signal timing was calibrated using on-site field observations collected at the study intersection in San Francisco. SUMO's osmWebWizard generated the simulation network, vehicle trips, and configuration files.
To enable reinforcement learning, we developed a custom Gymnasium environment that communicates with SUMO through TraCI (Traffic Control Interface). At every simulation step, the agent observes traffic conditions including queue length, waiting time, current signal phase, vehicle throughput, and teleport events. The agent then selects the duration of the next green phase using a Proximal Policy Optimization (PPO) algorithm implemented with Stable-Baselines3.
One of the major contributions of the project was the evolution from a single-intersection prototype into a modular multi-intersection framework. Instead of simply increasing training time, we redesigned the software architecture to support interchangeable observation spaces, reward functions, experiment configurations, and scalable evaluation pipelines. This modular design enabled rapid experimentation and laid the foundation for future city-scale reinforcement learning research.
Evaluation
We evaluated our reinforcement learning controller against SUMO's default actuated traffic signal controller, which serves as a strong industry-standard baseline.
Performance was measured using several transportation metrics:
- Average queue length
- Average waiting time
- Vehicle throughput
- Number of teleports (simulation deadlocks)
Evaluation was conducted under multiple traffic demand scenarios to assess the robustness of the learned policy. During the course of the project, we progressively increased the complexity of the environment from a single intersection to two connected intersections and ultimately to a six-intersection network.
The final multi-intersection model demonstrated up to a 16% increase in vehicle throughput while simultaneously reducing waiting times and congestion indicators compared to the baseline controller. Side-by-side simulation experiments showed that the RL controller learned to allocate green times more efficiently under identical traffic demand, allowing substantially more vehicles to complete their trips during the same simulation period.
Key Learnings & Impact
This project reinforced several important lessons about applying reinforcement learning to real-world transportation systems.
First, simulation fidelity proved to be just as important as the learning algorithm itself. Significant effort was devoted to validating traffic signal logic, calibrating signal timing using field observations, and ensuring that the simulated environment accurately reflected realistic traffic behavior before introducing reinforcement learning.
Second, scalability required software engineering rather than simply larger neural networks. As the project expanded from one intersection to an urban network, we developed a modular architecture that separated environment configuration, observation design, reward functions, training, and evaluation. This significantly improved experimentation and reproducibility.
Third, rigorous benchmarking was essential. Comparing the RL controller against an actuated baseline under varying traffic demand revealed both the strengths and limitations of the learned policy, highlighting scenarios where reinforcement learning generalized well and those requiring additional research.
Overall, the project demonstrates that adaptive traffic signal control using reinforcement learning can improve urban traffic efficiency while providing a flexible research platform for future work in multi-agent coordination, real-time deployment with live traffic sensors, and multi-objective optimization incorporating safety, public transit priority, and environmental sustainability.
Acknowledgements
We gratefully acknowledge the guidance and support of:
- Professor Maria Laura Delle Monache (Department of Civil and Environmental Engineering, UC Berkeley)
- Fred Nugen (School of Information, UC Berkeley)
- Todd Holloway (School of Information, UC Berkeley)
We also acknowledge the developers of the Simulation of Urban Mobility (SUMO) platform, which provided the simulation environment used throughout this project.
Finally, we thank the UC Berkeley Master of Information and Data Science (MIDS) program for providing the opportunity to conduct this interdisciplinary capstone project combining transportation engineering, reinforcement learning, and software systems.
