Traffic lights serve as a form of automated traffic control in many communities worldwide. Inefficient traffic light algorithms can increase travel time and reduce gas efficiency. By improving the algorithm, there may be improvements in user experience as well as economical and environmental advantages. This project involves developing a program to optimize traffic light pattern in order to expedite traffic flow.
With Python, we are able to model grid-based street systems with intersections and traffic lights. We can pass “cars” through our system given a start point and a destination and determine the time taken for each car in our simulation to go from point A to point B and their respective idle times. By controlling our traffic light model, we can determine an improved algorithm for traffic light patterns.
On a grid-based map, we have three algorithms for traffic light patterns: alternating between all vertical paths at intersections being green, all horizontal being red, and vice-versa; alternating various subsets of traffic lights between green and red; and alternating randomly determined traffic lights between green and red.
We hope to generate maps and collect traffic light data from real-world locations, as well as incorporating left-hand turns at intersections. This would allow for a more accurate simulation and realistic representation of traffic systems. In the future we hope to improve the GUI for visualizing the simulation. For optimization, machine learning can be used to modify the traffic light patterns on a randomly generated street map and operate on better-performing algorithms.

Log in or sign up for Devpost to join the conversation.