Maze-solving algorithm/code

Status
Not open for further replies.

Robo

Junior Member level 3
Joined
Jan 21, 2005
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
327
Hi,

I'm currently working on a maze-solving robot, and I'm using BasicStamp programming and Parallax's Board of Education as my microprocessor. Does anyone have idea on how the maze-solving code is like? Any algorithm or code is welcome.

Here is the algorithm that I'm currently using. But it does not work very well:

If (no obstacle in front)
>>keep on going forward 'now robot is going north
else if (obstacle in front)
>>turn right 90 degrees 'now robot is going east
>>if (obstacle in front)
>>>>turn left 180 degrees 'now robot is going west
run the loop again

... '>' means space here

The above code works in a primary sense. But the 90 and 180 degrees code won't work well once the robot is not going straight on the track.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…