Home / Hands-on activities / Maze Designer

Coding activity

Maze Designer

Navigate a tape maze on the floor! Use directional commands (forward, left, right) to guide a toy car or stuffed animal through the maze.

Hands OnAbout 20 minutesScreen-freeParent help expected

Materials and setup

How this changes by age

Pre-K (ages 3–4)

Navigate a tape maze on the floor! Use directional commands (forward, left, right) to guide a toy car or stuffed animal through the maze.

Difficulty 1 of 3

Steps

  1. Use tape to create a simple maze on the floor with a start and end.
  2. Place a toy car or stuffed animal at the start.
  3. Child gives directions: 'Go forward! Turn left! Go forward!'
  4. Parent moves the toy exactly as instructed.
  5. If the toy hits a wall, child adjusts the instructions and tries again.
  6. Tell a grown-up one thing that surprised you.
  7. Draw the robot and its path on one page; color the start green and the end red.

Learning objectives

  • Use directional language (forward, backward, left, right) accurately
  • Plan a path from start to finish through a maze
  • Adjust instructions when the initial plan doesn't work

Kindergarten (ages 5–6)

Design your own maze on paper, then write an algorithm (set of directions) to solve it. Trade mazes with a family member and solve each other's!

Difficulty 2 of 3

Steps

  1. Draw a maze on graph paper with a clear start (S) and finish (F).
  2. Write the solution as a series of commands: F3 (forward 3), R (turn right), F2 (forward 2)...
  3. Test your algorithm by tracing a finger through the maze following the commands.
  4. Trade mazes with a family member. Can they solve yours? Can you solve theirs?
  5. Write the algorithm for their maze and check it.
  6. Tell a grown-up one thing that surprised you.

Learning objectives

  • Design a solvable maze with clear start and end points
  • Write a directional algorithm using coded commands
  • Test and verify an algorithm against a visual solution

Early elementary (ages 6–8)

Design multi-level maze puzzles with keys, doors, teleporters, and collectible items. Write solution algorithms that track inventory (which keys you have) and use conditional logic (IF have key THEN open door).

Difficulty 2 of 3

Steps

  1. Draw a large maze on graph paper with multiple paths. Add game elements: colored keys, matching locked doors, teleporter pads that jump you to another location, and collectible coins.
  2. Create a legend showing what each symbol means: red key, red door, teleporter A (goes to teleporter B), coin (+10 points).
  3. Write the optimal solution algorithm using commands: MOVE(direction, steps), PICK_UP(item), USE(item), IF(have item) THEN(action). Track inventory as you go.
  4. Calculate the shortest path in total steps. Is there a path that collects all coins but takes longer?
  5. Create a 'score' for different solutions: points for coins collected minus steps taken. What is the highest-scoring path?
  6. Trade mazes with someone and see if they find the optimal solution you designed.
  7. In one sentence, tell a parent or sibling what surprised you today.

Learning objectives

  • Design complex puzzles with multiple interacting game mechanics
  • Write algorithms that track and use state (inventory) through conditional logic
  • Analyze multiple solutions for optimality using a scoring function

Upper elementary (ages 8–10)

Learn about maze-solving algorithms (wall follower, dead-end filling, Dijkstra's shortest path). Implement each one on paper mazes and compare their efficiency. Design a maze that defeats the wall-follower algorithm.

Difficulty 3 of 3

Steps

  1. Research 3 maze-solving strategies: the right-hand rule (always keep your right hand on the wall), dead-end filling (fill in all dead ends to reveal the path), and always-choose-the-shortest-path (a simplified Dijkstra approach).
  2. Draw a 15x15 grid maze with one entrance and one exit. Make it complex with many branches and dead ends.
  3. Solve the maze using each algorithm. For each: trace the path in a different color, count the total squares visited, and note the final path length.
  4. Create a comparison table: algorithm name, total squares visited, solution path length, and time it took you to execute.
  5. Design a special maze that the right-hand rule cannot solve (hint: it needs an island — a wall not connected to the outer wall). Explain why this breaks the algorithm.
  6. Write a one-page report comparing the three algorithms: which is fastest in practice? Which always works? Which uses the least memory (squares you need to remember)?
  7. In one sentence, tell a parent or sibling what surprised you today.

Learning objectives

  • Research and apply classic graph-traversal algorithms to physical maze problems
  • Compare algorithm efficiency using quantitative metrics (steps visited, path length)
  • Analyze algorithm limitations by designing inputs that cause specific algorithms to fail

Safety and evidence note

Read the full activity before beginning. An adult should supervise tools, heat, food, outdoor work, movement, and experiments as appropriate. Completion records that the activity was done; the child’s explanation, work sample, photo, or demonstration is stronger evidence of learning than a completion check alone.

Related coding activities

Browse all 575 activities · Explore course syllabi