A couple of weeks ago I described the recursive backtracking algorithm for generating mazes. Here’s an animation of the generation of a maze using recursive backtracking. As you can see, the maze begins as an array of unconnected little rooms, and grows room by room from one starting room.

Thanks!
LikeLike
This is way cool! Don’t understand it, but it sure is fun to watch! Now if the final product would only stay for more than a split second before it jumps to the next maze…
LikeLike
My bad. I just realized that it keeps building the same maze over and over again.
LikeLike
It’s just a GIF image; if you save it to disk and open it in an image editor, you can probably see all of the frames individually.
LikeLike
I like it.
If the browser renders it at the right speed, (and I watch often enough), I can follow the algorithm as it plays out.
LikeLike