# Through the Maze II

Create a maze for the Finch to navigate!

Intermediate II

#### Created By

This activity was based on an exercise created by Tom Simpson at Heathwood Hall Episcopal School.

Scratch, Snap!

4-5, 6-8, 9-12

### Making a Maze

Start by setting up a simple maze (unless your teacher has already set up a maze). Remember that the Finch obstacle sensors can be a bit finicky – large, lightly-colored objects (like cardboard boxes) make the best obstacles. Very narrow objects or objects made of certain black plastics may not register as obstacles. The picture below shows a sample cardboard maze created by teachers at Longwood University’s Institute for Teaching through Technology and Innovative Practices (ITTIP) program.

### Solving the Maze

To complete this maze, you will create a “wall following” robot. To follow a wall, your robot should repeat these three steps:

1. Move forward in a curved path (left or right) until an obstacle is detected. You’ll need to use one of the Finch’s obstacle sensors (depending on which way your robot turns). Also, remember that a Finch can only sense obstacles that are very close to it (2 to 4 inches away).
2. Move straight back a short distance.
3. Rotate in the opposite direction (45° to 90°).

This is a basic algorithm for following a wall, but you have some work to do to turn this algorithm into a program that works well for your robot. You will need to adjust your motor power and wait blocks until your program works correctly.

Extension #1: Try to make your robot complete the maze as quickly as possible!

Extension #2: Can your robot start at the end of the maze and move through the maze to the start? Do you need to modify your program?

Extension #3: Could your program solve a new maze? How much could the current maze change before your program would no longer work? What changes can you make to your program to enable it to solve different mazes?