...

/

Better Weaving with Kruskal

Better Weaving with Kruskal

Learn to generate mazes with a consistent, predictable number of crossings.

We'll cover the following...

Generating consistent mazes

We've seen randomized Kruskal’s algorithm, and now you might be wondering what this has to do with weave mazes. Recall how weave mazes were presented earlier, where the algorithm randomly attempts to move over or under passages. This certainly works, but it’s not very consistent. Sometimes, we may get a maze with a dozen crossing passages, and other times, we might only get one or two (or none at all!). That’s the nature—and consequence—of random. ...