Primary 20 Rooms Mazes Graphs Algorithms

Teaching objectives

Mazes have always had an irresistible pull — they are a natural challenge with an element of adventure! This lab is designed for primary-school students (though perfectly suited for secondary school too) and takes them on a journey that starts by walking through famous real-world mazes and ends with students designing their own. Along the way they discover that not getting lost is not a matter of luck: there are methods that always work.

What you'll learn

The lab develops spatial reasoning, planning skills, and algorithmic thinking. As students progress, the bird's-eye view of the full maze shrinks to a limited 3×3 grid view, which requires patience and the systematic use of the algorithms they have learned.

  • Three strategies for escaping a maze are studied, from simplest to most complete:
    • Right-hand rule: keep your hand on the wall and never let go.
    • Tarry (1895): mark the passages (two marks when entering, one when turning back) to avoid repetition.
    • Trémaux: mark the cells you step on; equally reliable and easier to remember.
  • Students learn that the right-hand rule does not always work: it fails when the goal is on an "island" that does not touch the outer wall. Recognizing when a method fails is just as important as knowing how to apply it.
  • Finally, students can build their own maze with a single path to the goal and several dead ends, and the teacher can run a competition where students solve each other's mazes.

Key mathematical ideas

  • A maze is a graph: cells are nodes and wall-free passages are edges. Solving it means traversing that graph.
  • "A single path to the goal" means the graph is a tree (no cycles). If there is a cycle, there is more than one path and the right-hand rule can go in circles.
  • Tarry's and Trémaux's markings are an intuitive form of systematic traversal (the idea behind exploring a graph without leaving anything behind).
  • Designing a valid maze requires controlling two quantities: the length of the solution path and the number of dead-end branches.

What it's for / connections

  • Provides a physical and intuitive introduction to the idea of an algorithm: a recipe of steps that guarantees the result.
  • Connects to graphs and to the difference between complete information (a map) and incomplete information (first-person view), a distinction that recurs in games and in real life.
  • The move from "solving" to "designing" develops inverse thinking: understanding a problem well enough to create it for someone else.
  • History and geography: famous mazes (Hampton Court, Longleat, Hatfield, the legend of the Minotaur) as cultural anchors for mathematics.

Room-by-room contents

Room 1 · The legend of the Minotaur

Mythical opening: the Minotaur locked in the labyrinth of Crete and the thread of Ariadne. Introduces the theme and the mascot (a friendly minotaur) with an illustration.

Student tasks

  • Read the legend and look at the illustration of the temple at the entrance to the lake.
  • Advance to begin the journey.

Room 2 · Hampton Court (~1700)

Photo of the hedge maze at Hampton Court (near London), trapezoidal in shape with a single path to the centre. The first famous real-world maze.

Student tasks

  • Look at the overhead plan and notice the trapezoidal shape.
  • Imagine where the entrance is and where the centre lies.

Room 3 · Walk through Hampton Court

First interactive walk with a full view (the whole maze is visible). The student enters from below and guides the mascot to the green ★ using the arrow keys.

Student tasks

  • Guide the mouse to the green star using the arrows.
  • Think the path through before moving, with the whole maze in view.

Room 4 · Longleat (1978)

Photo of Longleat: nearly 3 km of paths and six wooden towers to help with orientation. One of the largest mazes in the world.

Student tasks

  • Observe the size and the observation towers.
  • Discuss what the towers are for inside a maze.

Room 5 · Walk through Longleat (bridges)

Full-view walk introducing a new mechanic: wooden bridges. Two squares of the same colour are the ends of a bridge; stepping on one reveals the ↯ Jump button and teleports to the other.

Student tasks

  • Find the pairs of same-coloured squares (the bridges).
  • Use the Jump button (or the space bar) to cross and reach the cheese.

Room 6 · Hatfield House (1611)

Photo of the yew hedge maze at Hatfield House, over 400 years old. Closes the block of celebrated historical mazes.

Student tasks

  • Observe the plan of a maze from four centuries ago.
  • Discuss what it has in common with and what differs from the previous ones.

Room 7 · Walk through Hatfield

Last full-view walk, on the real digitised plan of Hatfield (25×16). Closes the "see everything" stage before moving on to navigating in the dark.

Student tasks

  • Reach the green ★ by planning the path with the complete map in view.

Room 8 · You can only see what's nearby

Key change of perspective: from here on only a 3×3 square around the mascot is visible. The journey starts facing downward; the rest of the maze is dark.

Student tasks

  • Exit the maze seeing only the nearby area.
  • Notice how different it is to navigate without the full map.

Room 9 · More paths, more decisions

3×3-view practice in a denser maze with many junctions; only one leads to the exit. Dead ends appear.

Student tasks

  • Explore, make wrong turns in dead ends and backtrack until finding the exit.

Room 10 · Two bridges — which do you cross?

Bridge puzzle with 3×3 view: now the bridges must be discovered by stepping on them, without seeing the map. Combines the bridge mechanic from Room 5 with the incomplete information from Room 8.

Student tasks

  • Discover the bridges (A and B) by exploring.
  • Choose which bridge to cross to reach the cheese.

Room 11 · The right-hand rule

Animated scene (reveal): the first method is introduced. If you keep your right hand touching the wall and never let go, you will reach the exit. No solving tasks — this is explanatory.

Student tasks

  • Watch the animation of the right-hand rule.

Room 12 · Try the right-hand rule

Practice the method in a simply connected maze. The right-hand wall is highlighted and each wrong step is penalised (−2), reinforcing the discipline of "never let go of the wall".

Student tasks

  • Exit by applying the right-hand rule, without letting go of the wall.
  • Try to do it with the minimum number of wrong steps.

Room 13 · When does the right-hand rule fail?

Multiple-choice quiz with 4 mini-mazes. The student must mark which ones the right-hand rule does NOT find the cheese in (when it is on an interior "island" not touching the outer wall). Key conceptual moment of the lab.

Student tasks

  • Analyse the 4 mini-mazes.
  • Mark exactly those in which the right-hand rule fails (three of the four).

Room 14 · Tarry's method (1895)

Animated scene (reveal): Gaston Tarry and his method that ALWAYS finds the cheese are introduced. The idea of marking passages: two marks when entering a new one, one mark when backtracking.

Student tasks

  • Watch the animation and understand Tarry's marking rule.

Room 15 · Hampton Court — practise Tarry

Back to Hampton Court, but now from inside (3×3 view) with buttons to mark the floor manually. The student applies Tarry for real on a large maze.

Student tasks

  • Mark the passages according to Tarry's rule while exploring.
  • Reach the cheese without revisiting already-exhausted passages.

Room 16 · Trémaux's method

Animated scene (reveal): the twist introduced by Charles Trémaux. Instead of marking passages, the squares you step on are marked (0, 1 or 2 marks). Equally reliable and easier to remember.

Student tasks

  • Watch the animation and compare Trémaux with Tarry.

Room 17 · Hatfield — practise Trémaux

Close of the methods stage: Hatfield from inside (3×3) with manual Trémaux marks. Each square accepts 0, 1 or 2 marks; Mark and Erase buttons provided.

Student tasks

  • Apply Trémaux by marking squares on entry and on return.
  • Reach the cheese using the marks to avoid getting lost.

Room 18 · Build your own maze

Editor with validation: the student places walls (click on grey lines) and hides the cheese. To pass, their maze must have a single path to the cheese, be long enough and have at least 2 false branches. Switches from solving to designing.

Student tasks

  • Draw a maze with a single path to the cheese.
  • Make sure it is long enough and has several dead ends.
  • Press Check and make adjustments if validation requests changes.

Room 19 · The challenge: someone else's maze

The teacher distributes the mazes designed in Room 18: each student solves another student's. If it has not arrived yet, they wait. Closes the create → exchange → solve cycle.

Student tasks

  • Wait for the maze assigned by the teacher.
  • Guide the mouse to the cheese in another student's maze.

Room 20 · Your maze, your way

Free editor with no validation and three sizes to choose from. Any maze is valid (it's creative) and can be downloaded as a PNG image or as text. Open closing room.

Student tasks

  • Choose a size and draw a maze freely.
  • Download it as an image or as text to share.

Rooms to project

The most striking ones to show and discuss in class.

Room 5 · Walk through Longleat — Large, eye-catching plan with the bridge mechanic: ideal for projecting so the whole class searches together for the colour pairs and decides the route.
Room 13 · When does the right-hand rule fail? — The "aha" moment of the lab. Project the 4 mini-mazes and debate as a group why the right-hand rule fails when the cheese is on an interior island.
Room 11 · The right-hand rule — The animation explains the method visually; perfect for showing once to the whole class before they practise.
Room 18 · Build your own maze — Projecting a maze under construction allows a class discussion about what makes a maze "good": a single path, length and false branches.