Junction Control

A traffic-signal planning game. Vehicles queue on four approaches and pedestrians gather on the corners. You decide which movement gets green next — every change costs three seconds of amber and all-red.

Run the traffic lights at a four-way junction for three minutes: keep queues short and let pedestrians cross.

FreeOn this device

N 0S 0E 0W 0peds 0

Your choice takes effect at the start of the next simulated second. Keeping the current green needs no action — it simply extends.

Vehicles: 0 arrived, 0 served, 0 waiting (N 0, S 0, E 0, W 0).

Waiting: vehicles 0 s in total (mean 0 s, worst 0 s); pedestrians 0 s.

Score = served × 10 − vehicle waiting seconds − pedestrian waiting seconds = 0.

Second 0 of 180 · All-red — choose a phase · served 0 · score 0 · paused.

Controls

  • Choose North–south, East–west or Pedestrians to set the next phase; End green stops the current green and holds all-red.
  • Step 1 s plays exactly one simulated second; Run plays on at the chosen speed; Pause stops time completely.
  • Reset replays the same scenario from the start with exactly the same arrivals.

The rules

  • Each green approach lets one queued vehicle through per second. There are no turning vehicles.
  • Every change of phase goes through 2 seconds of amber and 1 second of all-red, so two conflicting greens can never happen.
  • Pedestrians cross only during their own 6-second phase, which clears everyone waiting. Arrivals are fixed before you start and never react to your choices.

Scoring, saving and limits

After 180 seconds: vehicles served × 10, minus every second a vehicle spent waiting, minus every second a pedestrian spent waiting. The summary shows mean and worst waits and what is still queued. A negative score is shown as 0, with the raw value alongside.

Your run so far and your best score per scenario are kept on this device only. Download a backup to move them.

A simplified, one-second model for planning practice — not traffic engineering advice. The busiest scenarios bring more traffic than any plan can clear.

Questions

Why didn't east–west go green straight away?
Every switch needs 2 seconds of amber and 1 of all-red first. Choosing early saves time.
Does pausing cost me anything?
No. Waiting is counted in simulated seconds only, so a paused junction adds no waiting at all.
Is every run of a scenario the same?
The arrivals are, exactly. Only your choices change the result.