August 2010
Intermediate to advanced
288 pages
13h 21m
English
There are many well-known approaches to solving a maze. For this program, you will use a method known as the right-hand rule algorithm. (An algorithm is a set of instructions for solving a problem.) As the TriBot moves through the maze, it will always follow the wall to its right, going through any opening on that side.
The right-hand rule algorithm works for mazes without tunnels or bridges and where the start and end points are at the edges of the maze (this method won’t work for a maze where the goal is to get to the center). As long as the maze fits these criteria, the robot is guaranteed to find the exit.
Figure 7-4 shows an example maze with the path followed using the right-hand rule. To help you understand how this rule works, ...