Let's Make Robots!

Maze-Modified Flood Fill Algorithm

Does any one have any examples of how to implement this algorithm to solve a maze?  its my understanding that you have to assign distance values to reach the center of maze.  Keep track of walls encountered and update an array with the distance values.  This would be programmed om a BS2 and any info would help =).  Thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The simplest algorithm would be "Right Hand Rule" (or "Left Hand" depending on your predisposition).. but alot would depend on what kind of sensors you are using and what the maze contructed of.

The algorithm:

     If you can turn "Right" do so

     If you cant go any further backup on the path you came in on until you came to the last place you had a choice to turn

          Dont go down the same path you just came from - but the next path to the "Left"


This is pretty simple and will solve any "solvable" maze. 
Caveats include:
 1. The robot must be able to decern the "next path to the Left".
 2. The robot must be able to backup.


It would be using IR sensors