World's most popular travel blog for travel bloggers.

maze solving algorithms (pledge algorithm)

, , No Comments
Problem Detail: 

I saw this maze, and tried to apply pledge algorithms to it. But I am not able to solve this maze using this algorithm. What am I missing/doing incorrectly?

PLEDGE ALGORITHM: in both cases we don't get to exit. enter image description here

you can read about these algorithms at:

http://en.wikipedia.org/wiki/Maze_solving_algorithm

http://www.astrolog.org/labyrnth/algrithm.htm

Asked By : nishantbhardwaj2002

Answered By : FrankW

If you use wall following with the right hand, you should place your hand on the right wall.

For the pledge algorithm your source says

It's a guaranteed way to reach an exit on the outer edge of any 2D Maze from any point in the middle, however it's not able to do the reverse, i.e. find a solution within the Maze.

There is no guarantee that the exit reached is the one labeled "Exit" instead of the one labeled "Start".

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/29705

0 comments:

Post a Comment

Let us know your responses and feedback