Imagine you ask a robot to walk to the door and you only say, Go over there. Will it know which way to face, how many steps to take, or when to stop?
Today we will write instructions so precise that even a robot that only does exactly what it is told can reach a goal.
Two words for today.
An algorithm is a clear, ordered list of steps. A bug is a mistake in those steps that makes the plan go wrong.
Look at the demo grid on the floor. The start square is marked, and the goal is two squares ahead and one to the left. Watch the path the teacher points out. What is the first small step you would write?
Your group's job: write an algorithm that guides a robot from the start square to the goal on your desk mat.
You may only use three commands: forward, turn left, turn right.
Share the jobs in your group: the writer lays the command cards in order; the reader calls one step at a time; the robot moves the desk token exactly as told, with no helpful guessing; the checker watches for the bug and says which step went wrong. If your group is smaller than four, combine jobs (for example writer and checker).
Predict first: will your first sequence work, or will you need to find a bug? Then test. If it fails, fix one step and try again from the start. Leave your working cards in order on the desk when you finish so you can record them next.
On your Investigation Journal page, record what your group just tested on the desk mat.
Write your working command list in order (only forward, turn left, turn right). Then write: the step that went wrong, and what you changed.
Now we try the same idea on the interactive activity. The robot on screen only understands forward, turn left and turn right.
Help build a sequence that reaches the goal without hitting the obstacle. Predict before we press run. If it fails, spot the bug and fix the step that caused it.
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.