Skip to content

faria3islam/TrafficAutomation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrafficAutomation

Gemini-powered traffic intersection automation with a live Pygame intersection, AI light decisions, and dashboard stats.

What This Does

This project simulates a 4-way traffic intersection and uses Gemini as the traffic decision engine. At runtime, the app:

  1. Builds a traffic state from the simulation.
  2. Sends that state to Gemini.
  3. Receives a decision (next_light, duration_seconds, explanation).
  4. Applies the decision and renders the next frame.

Quick Start

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m src.main

Configure Gemini

Edit .env and set your key:

GEMINI_API_KEY=your_real_key_here
GEMINI_MODEL=gemini-1.5-flash

Run Tests

PYTHONPATH=. pytest -q

Notes

  • pygame is included in requirements.txt for GUI mode.
  • Launch the simulation with python -m src.main.

About

Traffic Automation Focused on Intersection Control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages