filmov
tv
Maze Generation - Kruskal's with flooding
Показать описание
Kruskal's Maze Generator is a randomized version of Kruskal’s algorithm: a method for producing a minimal spanning tree for a weighted graph.
Kruskal's is interesting because it does not "grow" the Maze like a tree, but instead carves passage segments all over the Maze at random, making it very fun to watch. Still, it results in a perfect Maze in the end.
The counterpart is to require storage proportional to the size of the Maze, along with the ability to enumerate each edge between cells in random order (Using here a set of edges and taking them randomly).