Your Turn
We’ve got four maze generation algorithms under our belts now. Two of them, Binary Tree and Sidewinder, are heavily biased but straightforward to implement and run very quickly to completion. The other two, Aldous-Broder and Wilson’s, are perfectly unbiased, but can take much longer to generate a maze. And even between Aldous-Broder and Wilson’s, we get to choose either slow-to-start or slow-to-finish. So many choices!
All these choices mean we can start trying some new ideas. We have more options to experiment with. Try some of the following suggestions, or experiment with your own ideas.
- Two-in-One
-
Try using two algorithms to generate one maze. Instead of using a single cell to start Wilson’s algorithm, what if you start with Aldous-Broder ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access