2

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

jj172
  • 103
  • 2

2 Answers2

1

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".

FrankW
  • 6,609
  • 4
  • 27
  • 42
0

The Pledge algorithm requires you to be able to recognize the entrance whenever you stumble upon it and treat it as a wall.

In essence, it is as if you initially walked into the maze and closed the entrance door behind you, immediately putting yourself at an interior point in the maze—the scenario that the Pledge algorithm is suited for.