A simple maze for a toy robot
Computer Science · Early Years · The School
Setting up a simple maze
Use tape, or blocks, to mark a simple path on the floor. Put a toy or a cushion at the end, as the GOAL. Keep the path simple at first. A few turns is plenty to start with. You can make it harder later on. Draw the path first if that helps. It makes the next step easier.
Writing the directions
Write down a list of moves to get a toy, or a friend playing robot, from the start to the goal. "Forward. Forward. Turn right. Forward." Each direction is one small step. Nothing is left out, and nothing is guessed at all. One missing step, and the whole path breaks. Write slowly and check each line.
Testing and finding the wrong step
Follow your directions exactly, one at a time. If the robot ends up in the wrong place, do not throw the whole list away. Go back through it, step by step, and find the exact one that was wrong. Only that step needs changing.
Directions: "forward, forward, turn right, forward." Follow them exactly. The robot ends up one square short of the goal, facing the wrong way entirely. Check each step, one at a time. Step one: correct. Step two: correct. Step three, "turn right": this is the problem — it needed to say "turn right, then forward" instead. Fix just that one step. Run the whole list again. This time, the robot reaches the goal exactly.