#### Skills

- Critical Thinking
- Project Based Learning

### Learning Objectives

- Understanding coordinates Making use of the While loop (undefined number of repetitions) Introducing conditions (IF and Else) Using random numbers to spawn Agent to random location within a set perimeter

### Guiding Ideas

When trying to find something in a fixed perimeter, is it generally faster to guess randomly or to follow a set procedure like a pattern sequence? Think about the game of Battleships. If they have played the game ask the children to recall if they guessed randomly or of they had a process they followed.

Play a game in class.

Create a 10 by 10 grid with letters for columns and numbers for rows, like a chess board.

Students pair up.

One student secretly chooses a square and starts a stop watch. The other student tries find the square by guessing randomly. Record the time it takes Repeat the process 10 times and calculate the average time it takes to find the square.

The process is repeated but this time the student guessing uses a sequence. Could be a different sequence each time.

Which method is fastest. Discus the pros and cons of random versus sequence.

The use of OneNote Class Notebook is great for students to record results.

### Student Activities

1. Students should create a new world with Blocks of Grass and then build a perimeter wall enclosing 10 x 10 blocks of grass. How many blocks are required to encase 10 x 10 blocks of grass? Most students will say 40 as they do not think of the corners. Let them think about it before telling them it is 44.

2. Randomly replace one of the grass blocks with a Redstone block.

3. Note down the coordinates of two opposite corners and explain what X Y Z coordinates are. Why does Y not change.

4. What is the maximum and minimum value of X and Z within the perimeter wall?

5. Teleport the agent to random locations within the perimeter wall by changing the values of X and Z

6. Now write a program to teleport the agent to a random location within the perimeter wall. The agent will move forward until it reaches the perimeter wall. Once the perimeter wall is reached the Agent is automatically teleported to a new random location and the process is repeated.

7. Modify the Agent program so that if at any time it is above the Redstone the agent stops and does a small victory dance.

8. Stretch exercises are added in the handout.

### Performance Expectations

Understanding 3 dimensional coordinates is not easy and some students will struggle to visualise all three dimensions. Assisting them to find and note down there diagonally opposite coordinates will help them understand the maximum and minimum vlaues of X and Z so that they remain within the pereimeter wall. Get students to practice teleporting the agent by manually changing the coordinates.

Majority of students will be able to follow the guided exercise without much trouble but not all will totally understand all the concepts of the programming. Get them to read through the illustrated handout first so that they understand each step before starting Minecraft. This would be a great opportunity for a flipped classroom where studnets get the exercise handout prior to lesson to review. A short session of questions and answers follow befoe starting the exercise. This will identify the students that may need more assistance.

#### Skills

- Critical Thinking
- Project Based Learning