Travelling is a part of our daily lives. We travel to school, work, etc., but many times, mostly in rush hours, we come across traffic jams. Traffic jams can be long and tedious, and they can also mess up our plans. While standing in a traffic jam for 10 minutes, a car's engine can produce up to 0,45kg of carbon dioxide pollution. We aim to make most traffic jams a thing of the past.

What it does

Depending on how many cars are on a road, we have developed a traffic light system algorithm, which completely takes care of a traffic jam inducing scenario, or at least makes it so that everyone on the road gets through the traffic jam relatively fast.

How we built it

Fristly, we built a simple single lane 4-way intersection using python's Pygame library. Then we created three different scenarios, in which we tested classic round-robin style of traffic light control. Next, we came up with a heuristic function, that looks at how many cars are standing on each side of the road and how long it has had a red light and by adding those two numbers together, the algorithm finds the most optimal side of the intersection to set a green light on.

Challenges we ran into

With no prior experience of being in a 6 developer team, the biggest challenge was the project's beginning and the distribution of different tasks.

Accomplishments that we're proud of

We're proud of the progress we have made as a team. Despite the rough beginning of the project we managed to create an algorithm that clearly makes a difference and could possibly affect our daily lives.

What we learned

Our python programming experience deepened greatly and so did our teamwork skills.

What's next for Smart Traffic

  • Real life implementation using sensors and AI
  • Adding an intelligent API to make way for emergency response vehicles
  • Further algorithm enhancement (e.g. tackling other important traffic problems)

Built With

Share this project: