The probabilities in the last two numbers are probably the most interesting to play with.
Mazes have been a longtime fascination of mine. I wrote my first maze generation program back around 1986, on a Dick Smith VZ200.
- Technically a single-solution maze such as is generated here is an undirected acyclic graph, with certain constraints applied.
- The inherent geometry of a square graph is the same as a hex graph, except that a hex map allows connections to six neigbours rather than four. In fact, the algorithm used here represents a hex graph internally as a grid.
- The 3D topology is now enabled. If you want to try the third dimension, I STRONGLY suggest you try a very small maze first. The 3D maze view includes a randomised goal.
- More interestingly, the algorithm is also easily adapted to a four dimensional space, where each square allows you to warp to one of two interconnected hyperdimensions.I’ve thought about trying to implement this but thinking about the space rotations in four dimensions in order to generate the first person view gives me headaches. What I may do instead is code the algorithm to only do fourth dimension transitions if a third dimension path is not available, then add “warp up” and “warp down” buttons to the UI.I will probably do this sooner or later. Navigating a hypercube is just too cool an idea to pass up. I doubt that I’ll carry the hex generation across to that however.
- The hex grid can be mapped trivially to a circular maze. (The center of the circle is the hex in the middle of the maze). I may or may not actually do this at some point. Calculating the arc segments isn’t inherently difficult but my last maths class was in 1988.