Set the railway inputs
—signal aspect
—safety risk
—driver action
—rule used
Mini signal box
A real railway uses many more checks, but this simplified model shows the big idea: sensors feed rules, and safe rules choose the most restrictive answer when there is doubt.
Press run to see the signal decision.
Signal coding challenges
Mission 1: Red means stop
Make the next block occupied. Which rule forces red, and why is that safer than amber?
Mission 2: Debug the points
Set points locked to “No”. Explain why a train must not be cleared through an uncertain junction.
Mission 3: Caution coder
Create an amber signal without any occupied next block. Which input made the system cautious?
Mission 4: Write pseudocode
Rewrite the lab's if/else rules in your own words, then test each branch with a scenario.
