create new tag
view all tags

What are Algorithms?

You are working in teams to develop a robot to solve mazes. Team members take turns being the robot Navigator and Driver. The Navigator gives instructions to the Driver. If the robot finishes the maze, the Driver says “YES!”. If the robot gets stuck against a wall or is unable to follow an instruction, the Driver says “NO” and the Navigator stops.

1. First, the team chooses a maze, and creates the set of instructions show in Model 1 below.

Model 1: Maze and Solution

“Go straight ahead
until you hit a wall,
then turn right.
Move forward
until you hit another wall.
Turn right again,
and move forward but only 1 time.
Turn left then move forward
until you can’t move anymore.
Turn left again, and move
until you get to the gold.”
a. Tiffany is the first Driver and succeeds in getting to the gold.
On the diagram in Model 1, trace the path that Tiffany used.

b. Brian is the next Driver. He listens carefully to each instruction but does not
get to the gold. He says, “Your language was too informal, and the instructions
seemed ambiguous! I didn’t always know exactly what to do.”
Brian is correct. The choice of words can introduce ambiguities. Find two different
examples of ambiguity from the instructions, and explain why each is ambiguous.

2. Based on Brian’s comments, the team decides not to use informal language. Instead, you create a succinct, standard robot language that the Navigator will use to describe robot actions.

This type of language is called “pseudocode.” The pseudocode is shown in Model 2, below.

Instruction Effect
LEFT robot turns 90 degrees to the left
MOVE robot moves forward 1 block in the direction it is currently facing
a. Using Model 2: Robot Pseudocode Version 1 , you create the new set of instructions shown below in Model 3. Brian is the Driver, and reaches the gold. On the diagram in Model 3, trace the robot’s path very carefully using the solution.

Model 3: Maze and Solution

  1. MOVE
  2. MOVE
  3. LEFT
  4. LEFT
  5. LEFT
  6. MOVE
  7. MOVE
  8. LEFT
  9. MOVE
  10. MOVE
  11. LEFT
  12. LEFT
  13. LEFT
  14. MOVE
  15. MOVE
b. It’s Tiffany’s turn to drive using the solution in Model 3. The Navigator had too much coffee and speak too quickly. Tiffany does some of the commands out of order! She ends up switching instructions 2 and 3, and this time does not find the gold. Circle on the diagram where the robot stops if instructions 2 and 3 are switched.

c. The sequence of instructions is often important. What if Tiffany had INSTEAD switched instructions 1 and 2? Would this have the same effect as in the previous question? Why or why not?

© 2014-2016 by The POGIL Project, http://pogil.org. This work is licensed under a Creative Commons Attribution-NonCommercial-Share-Alike 4.0 International License.

Topic revision: r1 - 2018-07-03 - JimSkon
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback