Welcome to www.RichardVannoy.info

Solving Line Mazes

Index

As a class project, and to help my students learn about robotic algorithms, I decided to design and build a Line-Maze Solving Robot. The documentation for this project grew rapidly, and became too long to comfortably fit on "one page", so I decided to split this into sections. Use the links below to cruise around.

Part 1: What is a Line Maze?

1.1 What is a line maze?

1.2 Definitions

1.3 Islands

1.4 Rules

1.5 A Basic Algorithm (System) for Solving a Maze

1.1 What is a Line Maze?

Here are some photos of line mazes I have created with a brief description of each.

Figure 1-1: My First Line Maze

Figure 1-1 shows the first line maze I constructed. This is a standard, large classroom white board with 3/4 inch electrical tape for lines. The contest using this maze required a robot to start at the open rectangle at the top-right of the photo and navigate, using the black lines, to the "finish line" or the black rectangle at the bottom-right.

Figure 1-2; A Small, Portable Maze

Figure 1-2 shows a small portable maze I built in 2008. Notice the retangular cut-out at the bottom-center that is my carrying handle. I made a line maze on this side of the board and an oval race track on the other side of the board. This way, I could travel from classroom to classroom and bring along a robot to display and demonstrate for both line following and line maze contests. This course is on a 2 X 4 foot piece of plywood and to get an idea of scale and size, all of the intersections are 6 inches apart. The small upside-down "T" at the bottom left is "Start" and the black rectangle at the bottom-right is the "Finish".

Figure 1-3: The Monster!

Last year, my students were working on using the 3PI robot (Pololu.com) which was considerably faster than the Parallax BOE-Bot and other servo driven robots. They wanted a challenge, and specifically a maze that would reward the robot who could attain the fastest speed. Notice the long straightaway down the center. This allowed a "smart" robot to accelerate rapidly here and on the other fairly long straight sections on either side of the maze. As above, the intersections are six inches apart. The total length of the shortest path to the finish is 27 feet, and the team shown here completed this maze in the incredible time of thirteen seconds!!

Here is the You-Tube video showing the team in the photo above winning the line maze contest.

1.2 Definitions

Only a few of the definitions needed to get you started are covered here. For a complete list of definitions for mazes, go to astrolog.org.

Most maze solving robots operate in "Perfect" mazes or mazes with no loops.

Loop
A path that connects with itself forming a circle.
Maze
A network of interconnected passages meant to be a challenge to navigate from start to end. Today this most often means a non-unicursal intellectual puzzle. Comes from the Old English word to confuse or confound.
Perfect Maze
A Maze without any detached walls and without any isolated sections. A perfect Maze always has exactly one solution, and there is always exactly one unique path from any point in the Maze to any other point in the Maze.
Simply Connected
A Maze without any loops.
Shortest Path
The Holy Grail of Maze solving. A shortest path is a solution such that no other solution path in that Maze has a shorter length. A Maze can have more than one shortest path.
Solution
A path in a Maze from start to finish.
Solve
The act of finding the solution to a Maze.

1.3 Islands

 

1.4 Rules

1.5 A Basic Algorithm (System) for Solving a Maze

1.5.1 One of the most common methods for solving a maze is called the wall follower rule which can use the right-hand rule or the left-hand rule. Put one hand on the wall inside the maze and start walking. If the maze is simply connected and has no loops (see definitions above), then you will always get to the end of the maze. See this Wikipedia page for a more detailed explanation of maze solving algorithms.

To successfully traverse a line maze, a robot needs to develop several behaviors:

These behaviors are needed just to travel around the maze:

And these behaviors are required if the robot is to become "smarter" as a result of going through the maze:

1.5.2. Strategy: In most maze solving contests, the rules allow the robot to make two or three runs through the maze, and the winner is the robot that can solve the maze in the shortest time. There are a number of ways to do this, but typically, the robot sets up a strategy that will allow the robot to solve the maze in two passes through the maze. Something like this:

In the first pass, the robot has no choice but to go down a number of dead-end paths as it learns the maze.

In the second pass, the robot has learned the "bad" turns then can proceed down the shortest path to the goal.

The basic sequence for the first pass is:

For pass two, the robot retrieves the stored information which provides the correct direction to proceed at each intersection to complete the maze in the shortest possible path.