Skip to content
AI-grafen
AExplorerProgramming· about 40 min· fundamentals that rarely change· verified 2026-09-20· EN

Project A: the robot course

Be able to plan a course, steer the robot around it, and fix the instructions when something goes wrong.

Prerequisites

Everyday explanation

The project: build a course on the floor or in a grid with a start, a goal and at least one obstacle. Write a program that takes the robot (a friend, a Blue-Bot or a sprite in Scratch) all the way there.

Steps:

  1. Draw the course on squared paper.
  2. Write the commands — use repeat wherever the same thing happens several times.
  3. Run exactly what is written. Did it go wrong? Find which command it was and change only that one.
  4. Show the course and the program to someone else. Can they run it without your help?

Interactive

Example course (R = robot facing right, X = obstacle, G = goal):

R · X · ·
· · · · ·
· · · · G

One program: forward, right, forward, forward, left, forward, forward, forward. Can you shorten it with a loop? (forward, right, repeat 2: forward, left, repeat 3: forward.)

Make your own course harder: two obstacles, or a goal that requires the robot to turn all the way around.

Mastery means

  • Plans a course and writes the commands before running
  • Finds and fixes an error after a failed run
  • Uses a loop where the same thing repeats

Sign in to do the exercises and build your mastery up.

Sources

All the sources and licences