How charan9716/traffic_rl_project works
This repository is a traffic-signal RL simulator, with a Streamlit dashboard as its documented product workflow: users configure finite queues, run or step an episode, and inspect signal choices, vehicle delays, and episode metrics. A separate Python runner trains a tabular Q-agent against a fixed-policy baseline and launches a Pygame view. The DQN implementation is present but is not wired into either runtime path in the shown source; the dashboard describes it as a possible replacement. Edges reflect only calls or behavior documented in the supplied excerpts.
Main entry points: streamlit_app.py Dashboard and Tracking · environment.py Intersection Environment · main.py Training Runner · gui.py Pygame View
Components 8
Streamlit Dashboard
- Dashboard and Tracking
streamlit_app.py
Traffic Simulation
- Intersection Environment
environment.py
Learning and Policies
- Tabular Q-Agent
q_agent.py - DQN Agent
dqn_agent.py - Fixed-Phase Policy
baseline.py
Training and Pygame
- Training Runner
main.py - Pygame View
gui.py
Other components
- User
Connections 13
- User → Dashboard and Tracking: configures and observes
README.md - Dashboard and Tracking → Intersection Environment: creates and resets
streamlit_app.py - Dashboard and Tracking → Intersection Environment: chooses phase
streamlit_app.py - Dashboard and Tracking → Intersection Environment: steps episode
streamlit_app.py - Dashboard and Tracking → Intersection Environment: reads queues and metrics
streamlit_app.py - Training Runner → Intersection Environment: creates and resets
main.py - Training Runner → Intersection Environment: steps episode
main.py - Training Runner → Tabular Q-Agent: chooses and updates
main.py - Training Runner → Fixed-Phase Policy: gets fixed actions
main.py - Training Runner → Pygame View: launches view
main.py - Pygame View → Intersection Environment: steps episode
gui.py - Pygame View → Tabular Q-Agent: chooses actions
gui.py - Dashboard and Tracking → DQN Agent: possible policy replacement