I did a maze contest with a Boe Bot about eight years ago. If you use a boe bot with two bumpers your best bet is an edge following approach. Here is an article about the idea as it pertains to insects. This doesn't really tell you how to write the code, but it has a nice diagram of the behavior you want to emulate. http://www.mindcreators.com/EdgeFollowing.htm
As I recall I had the bot turn left 90 degrees when it hit an obstacle head on (hit both bumpers), and then have it veer right until the right bumper brushed the wall. When that happened it would back up a little and turn left a little. That made it follow a wall on the right hand side. It is good if the veering to the right gets more severe if no bumper is touched for a while, so that it can turn right around a corner. The idea is to be able to hug an L shape as in the diagram.
Just by following along one edge you can solve any maze that does not have a circular path. If you have better sensors-- IR or a Ping sensor you could follow a wall without touching it. Some maze contests have an element where you can do the maze multiple times and get faster by remembering it. I don't know if a Basic Stamp normally has enough memory to remember mazes. Also, the method I am describing here is more behavioral, so it isn't like the robot has a mental model of the maze to remember.
Comments
@GerardoCR - First of all, do you want to solve a line maze or a walled maze?
Here is SRS' Line Maze Contest rules and info - http://www.robothon.org/robothon/maze.php
Here is one for a Wall Maze Contest - http://www.robothon.org/Robothon2001/grandmaze.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
Post Edited (Whit) : 10/7/2009 7:33:08 PM GMT
http://www.mindcreators.com/EdgeFollowing.htm
As I recall I had the bot turn left 90 degrees when it hit an obstacle head on (hit both bumpers), and then have it veer right until the right bumper brushed the wall. When that happened it would back up a little and turn left a little. That made it follow a wall on the right hand side. It is good if the veering to the right gets more severe if no bumper is touched for a while, so that it can turn right around a corner. The idea is to be able to hug an L shape as in the diagram.
Just by following along one edge you can solve any maze that does not have a circular path. If you have better sensors-- IR or a Ping sensor you could follow a wall without touching it. Some maze contests have an element where you can do the maze multiple times and get faster by remembering it. I don't know if a Basic Stamp normally has enough memory to remember mazes. Also, the method I am describing here is more behavioral, so it isn't like the robot has a mental model of the maze to remember.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Robots
Thats very funny and very cool...................
it sounds very best............
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
maison bois