Build Nights / Night 6
Night 6 of 18Week 12 · Term 2: Robots and systemsProposed · no date yet
Engineering a Traffic Network
How does a junction decide whose turn it is, and how do you make a whole road of junctions turn green just as you arrive?
This night is part of a proposed programme. It has not been scheduled and has not taken place. When it is scheduled it will appear on /live/. You can do everything below on your own, today.
The big question
What are the states, events and outputs of a traffic-light controller? How do the cycle time C and the red time r set the average wait (≈ r²/(2C)), and how do you time two junctions so traffic meets a green wave?
In the real world
Junction controllers are state machines, and many have an independent conflict monitor that switches the junction to a safe flashing or all-red mode if it ever detects conflicting greens. Along busy roads, neighbouring junctions are coordinated with offsets so platoons of cars meet successive greens; adaptive systems adjust timings from detectors in the road.
Try it: the guided experiment
Everything runs in your browser. No real hardware, ever.
- BUILD 005 Level 2: build the controller as a cycle of timed states and pass the safety audit.
- BUILD 005 Level 3: tune greens and clearances for rush hour on the busy road.
- In the logic lab (/playground/logic/), write the interlock as a gate: conflict = NS_green AND EW_green. Check it is 1 only in the one forbidden row.
- New, on paper: two junctions 300 m apart, cars at 12 m/s. Calculate the offset that makes a car leaving the first green arrive on the second green.
The design challenge
Two junctions, one main road: using your BUILD 005 cycle, choose the second junction’s offset for a green wave towards town. Then the twist: in the evening, traffic flows the other way. Can one offset serve both directions? Explain who waits longer as a result.
At your level
- Level 1 · ExplorerBUILD 005 Level 1: judge six moments as safe or a conflict, and say what the lights show next.
- Level 2 · BuilderBUILD 005 Level 2: build the state machine and pass the safety audit.
- Level 3 · InnovatorBUILD 005 Level 3: balance the junction for rush hour, then do the green-wave challenge.
- Level 4 · Systems EngineerBUILD 005 Level 4: cycle time, green share, average wait r²/(2C) and capacity; then the two-way offset question.
- Level 5 · Research EngineerBUILD 005 Level 5: investigate a policy (for example, crossing on demand against every cycle) across at least four runs.
What the model leaves out
The green-wave calculation assumes every car travels at one steady speed and that no queue is left from the previous cycle. Real coordination is tuned with measured traffic.
Where you’ll work
Watch first (optional)
- Computers Without Memory - Computerphile (opens YouTube in a new tab)Computerphile · 8 min 51 s · Level 3Introduces machines that run on states and transitions, the same idea a traffic-light controller uses.
Afterwards
BUILD 005 Level 4 maths or a Level 5 policy investigation.
Everyone can take part
- Slides use large, high-contrast text and never rely on colour alone. The host describes every chart and animation aloud.
- Live captions switched on and tested before the session; the host reads each on-screen instruction aloud.
- Every lab and Build works by keyboard, gives text readouts of its results and respects reduced-motion settings.
- Worksheet available to print, in large print and as plain text; answers can be typed, drawn, or spoken to a helper.
- Light states are announced in text (“north–south green”), not only by colour; read them aloud during the demo.
How the live session is kept safe
- A host and a separate adult supervisor are there for the whole hour.
- Your camera, microphone and chat stay off. Ask questions in the moderated box; they are read out without your name.
- Nobody will ask for your personal details, photos, school or location.
- Everything happens in a simulation or on paper. Never open or change a real device.
Running this with a group? Open the printable facilitator kit.