Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.43 KB

robot.md

File metadata and controls

31 lines (20 loc) · 1.43 KB

Robot Game

Necessary resources:

  • Big pad of paper
  • Maze taped out
  • Cupcake
  • Pens

Divide your team into groups of 5 or 6. Find one of the mazes.

One coach will be the robot. The aim is for the students to direct the robot through the maze to retrieve a cupcake.

Start by explaining to the students that a computer is basically a dumb robot. It follows your directions, and your directions need to be precise enough for the robot to execute them exactly.

First, the students must look at the maze and write down a set of commands they think will direct the robot through the maze. Once they have a set of instructions, they can run their 'code'. The robot-coach must follow the directions exactly.

Things to watch out for:

  • Did the students tell you how long a 'step' was?
  • Did they define how far to turn?
  • Did they tell you to bend down etc to pick up the cupcake
  • Did they tell you to go back through the maze?
  • Did they tell you what to do with the cupcake?

Once the first run through is done (which likely will be unsuccessful), encourage the students to iterate their code so that it executes correctly. Encourage them to be precise with their instructions.

When they have successfully written code to fetch the cupcake, walk through simplifying their code.

e.g. If the code says to walk forward 2 steps of 30cm length multiple times, you can define a step as 30cm, and 2 steps as 'walk forward'. The same applies for turns, etc.