About this experiment
Build a small program and test it on a three-dimensional board. The robot follows each instruction literally, making a blocked move or an incorrect turn visible. Compare an intended route with the actual execution trace, then edit the program and try again.
Learning goals
- Translate a route into an ordered sequence of precise instructions.
- Debug a program by inspecting position and direction after each step.
- Explain how changing an obstacle changes a program outcome without changing its instructions.
How to use it
- 1Run the initial program and identify the first instruction that does not match your intended route.
- 2Rewind and use Step and Back to inspect the position after each instruction.
- 3Load Example route, predict its endpoint, then run to the goal.
- 4Drag a board tile upward to create an obstacle. Repair the route using the command buttons, then record the program and its result.
The model
Assumptions
- The board has six rows and six columns. The robot begins at the lower left facing right; its goal is the upper right.
- A forward instruction moves one cell. Left and right turn 90 degrees without moving. A collision or arrival at the goal ends execution.
- The robot is an instruction interpreter, not a rigid-body physics simulation. Visual interpolation does not change discrete cell positions.
Try this in class
- Q1Why can the same instructions work on one board and fail after a wall is moved?
- Q2How could you write a shorter program if repetition commands were available?
Frequently asked questions
Does the robot find its own way?
No. It executes the supplied sequence exactly. Finding and correcting a route is the experiment.
What happens at a wall?
The robot stays in its last valid cell, marks the move blocked and stops the program.