Simulation ready
Live intersection simulation
Game and training controls
Manual signal decisions
Learning parameters
Reward designer
Simulation options
Traffic arrival rates and custom scenario
Plotly performance dashboard
Analytics explorer
Controller comparison
| Controller | Reward | Waiting | Queue | Cleared | Gridlocks |
|---|---|---|---|---|---|
| Trained agent | — | — | — | — | — |
| Fixed timing | — | — | — | — | — |
| Random controller | — | — | — | — | — |
Achievements
Results, reports, and policy tools
Latest episode report
Event log
How the learning game works
How to play
- Select a traffic scenario and controller.
- Adjust learning, signal, and reward settings.
- Start training and watch queue behaviour.
- Test the learned policy without exploration.
- Compare it against fixed and random controllers.
Learning concepts
State combines queue levels and the active phase. Action changes or preserves a safe signal phase. Reward values throughput while penalising congestion.
Exploration tests alternatives. Exploitation uses learned values. The discount factor controls how strongly future traffic outcomes matter.
Example scenario
| Direction | Arrival rate | Typical queue | Recommended response |
|---|---|---|---|
| North–South | High | 12–20 vehicles | Longer green with switch protection |
| East–West | Medium | 6–10 vehicles | Regular service to maintain fairness |
| Pedestrians | Low | Occasional request | Serve before excessive waiting develops |
Frequently asked questions
What is the agent learning?
It learns which safe signal phase best matches different queue conditions.
Why can rewards become negative?
Waiting, queues, emissions, gridlock, and excessive switching create penalties.
What does exploration change?
Exploration makes the agent try uncertain actions instead of always using its current favourite.
How is gridlock detected?
The game flags gridlock when queues become very large across several directions.
Can I control signals manually?
Yes. Select Manual controller and use the phase buttons or number keys.
Are dangerous signal combinations possible?
No. The simulation uses mutually exclusive phases and an all-red transition.
Can a learned policy be saved?
Yes. Policies can be stored locally, exported, and imported as JSON.
How should I compare controllers?
Use identical traffic rates and compare waiting, queues, reward, throughput, and gridlock incidents.
Does this simulate real traffic engineering?
It is an educational approximation, not a certified traffic-control or road-safety system.