Maze Generation: Weave mazes(weblog.jamisbuck.org)
weblog.jamisbuck.org
Maze Generation: Weave mazes
http://weblog.jamisbuck.org/2011/3/4/maze-generation-weave-mazes
1 comments
They look like they might be harder to solve then normal mazes. Usually I just follow a wall for a maze. Would that work here?
I don't see any reason why it shouldn't. The backtracking algorithm doesn't care what shape the maze is or if it overlaps itself.
EDIT: Since a maze (overlapping or not) can be represented as a tree of nodes, backtracking will certainly lead you through every point.
Even if the graph is not a tree (ie it loops around) backtracking will still get you everywhere if you reverse direction once you come across somewhere you've already been.
EDIT: Since a maze (overlapping or not) can be represented as a tree of nodes, backtracking will certainly lead you through every point.
Even if the graph is not a tree (ie it loops around) backtracking will still get you everywhere if you reverse direction once you come across somewhere you've already been.
Same thing; just check for loops