# Robots

Purpose

In this unit students explore movement and direction concepts in the context of programming a robot to move. They will be developing sets of instructions to accomplish tasks, focusing on the use of right, left, forward, backwards and quarter turns.

Achievement Objectives
GM2-5: Create and use simple maps to show position and direction.
Specific Learning Outcomes
• Describe the difference between movement and direction.
• Order a set of movement and direction instructions.
• Create a set of instructions.
Description of Mathematics

At Level 2 the position element of Geometry continues developing and giving experiences of using everyday language to describe position and direction of movement, and interpreting others’ descriptions of position and movement started at Level 1.

The ability to be able to give clear instructions is important skill needed today. Being able to describe direction and movement in an orderly precise way is useful in a wide variety of situations. The context of programming a robot in this unit gives students to learn in a practical way. This context will require students to think in a logical and systematic way. Finding mistakes, identifying the cause and fixing them will be a feature of the thinking prominent during this unit. This unit also allows skills to be developed that will be useful as students work with computers.

Required Resource Materials
Activity

#### Getting Started

1. This unit of work starts with a class discussion about robots. Find out what the students know about robots and their uses. The main point of the discussion is that the students start to understand that robots do not think for themselves. They move because someone has given the robot a set of instructions. Without these instructions the robot can not do anything. The following questions could be used:
What is a robot?
What are they used for?
Why are they used?
Can robots think?
Do they have a brain like a human brain?
If not, how do they know what to do?
What sort of instructions?
What is the name of a person that writes instructions for robots?  (programmer)

2. Explain to the students that they are going to be writing some instructions to see if they can get a robot to do things for them. Show the students the instruction cards and explain what each card instructs the robot to do. 3. Have the class sit around the outside of an 8 x 8 grid. This could be marked in chalk on concrete outside, in marker on a large piece of fabric, or with masking tape on the carpet. This is called the walk-on grid later in the unit. This grid will be used throughout the unit.
F means move forward one square.
B means move backwards one square.
R means turn to the right 1/4 turn (90°).
L means turn to the left 1/4 turn (90°).
End means the set of instructions is finished.
If the robot had the cards, F  F  F  F end,  what would it do?
What would the instructions,
R  L  R  L  end, do?

4. Explain to the students that we will be getting the robot to move and do things for us on an 8 x 8 grid. The squares in the grid need to be large enough for a student to stand in them, e.g. 50cm x 50cm. Also explain that they will sometimes be the programmer, writing the instructions, and sometimes the robot, following the instructions.

5. Place the following set of instruction cards, so the students can see them. Pegging the instruction cards onto a line would be a good way to display them. This way the teacher can change the order easily and the students can clearly see the instructions are a set of individual instructions.
F  F  F  F  R  F  F  F  F  end

6. Get one student to be the robot while the teacher calls out the instructions. Before starting have the students predict where the robot will end up.

7. Work through the instruction cards, one at a time, to see where the robot ends up. Reinforce the idea of “One card, one action” with the robot only doing what the instruction cards say, nothing more, nothing less. L means 1/4 turn to the left staying within the square the robot is in, it does not mean turn left then move into the next square.

8. Continue this discussion exploring how the robot works and the meaning of each instruction card. The impact of changing the cards, the order of the cards and the starting point of the robot need to be considered. The following questions could be used to facilitate this discussion.
What would happen if we changed the L to an R in the set of instructions above?
Where would the robot end up?
Would we end up at the same place if we used the same set of instruction cards but the robot started in a different place?
Where would the robot end up if we started here, but kept the same set of instruction cards?
Starting here,
where do you think the robot would end up with this set of instruction cards?
F  F  F  F  F  B  B  B  B  B  end
Starting here,
where do you think the robot would end up with this set of instruction cards?
Which direction will the robot be facing at the end?
B  B  B  L  B  B  B  L  B  B  B  L   B  B  B  end

#### Exploring

Over the next 2 or 3 days the students in pairs, will be using the instruction cards to programme the robot to do a series of tasks. The number of tasks and the choice of tasks, needed to be worked out by the teacher to match the ability level of each group of students. The tasks do not need to be completed in order, although they do get progressively more difficult going down the page.

The tasks are designed for an 8 x 8 grid with the following headings. An important part of this unit is developing the students' ability to debug. “Debugging” is the process of finding a mistake, identifying the cause and fixing it. To help students think through the mistake they will make, a counter with an arrow on it to show direction moved over a paper grid may help. Others may need to walk through their instruction cards on the walk-on grid. Working out the set of instructions away from the walk-on grid is important.

Getting the students to place their set of instruction cards onto a ring, a length of string or a pipe cleaner will keep their cards in order when dropped.

Start the robot at 7, facing into the grid. Move around the grid and leave at D.

Start the robot at 5, facing into the grid. Move around the grid and leave at G. There must be more than one direction cards used, i.e. more than one L or R.

Start the robot at F, facing into the grid. Move around the grid and leave at 8. Each type of instruction card, L, R, F, B must be used at least two times.

What is the least number of instruction cards needed to start the robot at E, facing into the grid and move around the grid and leave at 6?

Start the robot at F, facing into the grid. Move around the grid and leave at 8. Each type of instruction card, L, R, F, B must be used at least two times. For the next two tasks two new instruction cards need to be introduced. PD means to put down the object the robot is carrying in the square the robot is in.PU means to pick up the object in the square the robots is in. The robot doesn’t move or change directions as it picks up the object.

Start the robot at F, facing into the grid. Move around the grid and pick up the object from the diamond and place it at the cross. Leave at F

What is the least number of instruction cards needed to start the robot at A, facing into the grid and move around the grid, picking up an object at the star and put it down at the circle leave at 1?