Advertisement

Maze Algorithm question...

Started by August 18, 2001 12:23 AM
11 comments, last by KrunkSplein 23 years, 3 months ago
if you aren't supposed to turn left when using the right hand rule, how do you handle turns to the left such as this:

######_#
######_#
________#
########

(used underscores to stop the wierd formatting)

krunk

Edited by - KrunkSplein on August 19, 2001 12:10:59 AM
---------Krunk
The right hand rule only works on some classes of mazes... it was originally applicable as a solution to labyrinths, since they have only a single path to follow. For those mazes that are made from labyrinths by removing sections of walls and blocking paths, the RHR works. There are, though, many examples of mazes that cannot be solved using the right hand rule... too many to go into. There are some great websites out there dedicated to maze solving algorithms... do a google search... I am sure you''ll be entertained for quite some time!

Cheers,

Timkin
Advertisement
quote: Original post by KrunkSplein
if you aren''t supposed to turn left when using the right hand rule, how do you handle turns to the left such as this:

The rule isn''t "never turn left", the rule is "whenever given a choice, take the rightmost choice."

This topic is closed to new replies.

Advertisement