Draw a maze and watch different algorithms beat it


#1

Originally published at: http://boingboing.net/2016/11/28/draw-a-maze-and-watch-differen.html


#2

Didn’t play (because it’s too much effort), so might have missed some amazeballs cleverness, but…the only figure-out-a-maze algorithm I’ve ever needed was taught to me by L. Frank Baum in Jack Punkinhead of Oz when I was just a kid:

Always turn left

Works every time!

 
 
 
 
(Contrarians can use the “568-A” variant: Always turn right ; -)


#3

This only works for a small subset of mazes. Notably, you can make mazes in the linked app where it doesn’t.


#4

Specifically: mazes where the walls containing the start and the end of the maze are connected to each other. If the start point and the end point are both on the outside of the maze, then sure. But if you’re trying to work your way from the outside to the middle, and no series of walls connects the outer walls to the inner ones, you can always turn left (or always turn right) from now until eternity, and you’ll just keep ending up where you started while never getting to the end.


#5

Note that this is still only a sure when the maze is logically flat and all paths are omnidirectional. We’ve got a number of hedge mazes in my area where the turn left rule doesn’t work even though both the start and end point are outside of the maze because they have sections with stairs that go over other paths. And anyone who has played pokemon knows how easily taking away omnidirectionality can make a maze painfully hard.


#6

True. I was thinking mainly pen-and-paper mazes, but you’re right: those would also qualify. I don’t think you can make either of those kinds of obstacles in this simulator, though.


#7

You can’t, you’re right, just wanted to keep things clear :slight_smile:


#8

I think always turning left just means you will always find your way out of the maze.

You might end up back at the entrance, but you will find your way out.


#9

This is the best way to get out of a hedge maze.


#10

This topic was automatically closed after 5 days. New replies are no longer allowed.