Lesson 10 · 60 minutes

The Maze Race

Everything at once, against the clock

Today's goal

Get your robot through a maze it has never seen, using a strategy you can explain.

Ideas in this lesson

Sense → Think → Do

The full loop, under time pressure, with a maze nobody has calibrated for.

How the session runs

  1. Teams assemble their 2×2 room modules. Modules get rearranged between runs, so nobody can memorise the answer.
  2. Open the Maze Lab and try both strategies in simulation before touching a robot.
  3. Load a dead-reckoning program into Slot 1 and a wall-follower into Slot 2.
  4. Practice run. Note where each one fails and why.
  5. Race. Pick your slot at the start line by pressing 1 or 2 on the remote — no phone allowed on the floor.
  6. Debrief: whose strategy won, and would it win again on a different maze?

Sample program

The right-hand rule. Turn right, then check up to three times whether a wall is in the way and turn back left if so, then drive forward. Repeat. This escapes any maze whose walls are all connected — slowly, but it always gets out.

V 5
P 20
R 350
I 5
L 350
Z
I 5
L 350
Z
I 5
L 350
Z
F 900
Q

Paste it into the Workshop's Robot language box, then press Text → blocks to see it as blocks — or just send it straight to the robot.

Try this

When it goes wrong

What you seeWhat it means
The dead-reckoning run drifts more each roomThat is accumulated error. It is not fixable by trying harder — it is why sensors exist.
Wall follower loops forever in a circleCheck the maze actually has an exit reachable from the start. A sealed maze defeats a correct algorithm.
Notes for the grown-up

Insist every team can state their strategy in one sentence before racing. The team that says 'we tuned the numbers until it worked' has learned less than the team that says 'we follow the right wall and accept it is slow', and the maze rearrangement will prove it in public.

← Avoiding & SeekingGetting Off the Line →