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:




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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.