02 Jun '12, 5pm

Maze Generation: Recursive Backtracking

Actually, once you understand this algorithm, I think the best place to go next would be to change it to a breadth-first traversal. The intuition here is that a maze is an undirected graph, and this algorithm constructs the maze by traversing that graph in depth-first order. This is dandy, but as Jamis noted, it requires stack size proportional to the size of the maze (in the worst case). Actually, it would be more precise to say that it require stack size proportional to the longest acyclic path through the maze, which is (in the worst case) the entire maze, but in the average case will be much much less. Anyway, the motivation for breadth-first traversal is that you no longer have to maintain the longest acyclic path, you simply maintain a queue of unvisited cells. The worst-case complexity is a lot better here, seeing as it can’t be the entire maze (actually, I believe ...

Full article: http://weblog.jamisbuck.org/2010/12/27/maze-generation-re...

Tweets

Maze Generation: Weave mazes

weblog.jamisbuck.org 01 Jun '12, 11am

@Robin, very nice, I love how it’s actually simpler to allow adjacent crossings. I’ll bet it could even be simpler: we pro...

Design is also a Recursive Activity

designsojourn.com 11 Jun '12, 3pm

When we iterated in a Design Process, it is actually a refinement activity where one evolution gives way to the next evolu...