Wilson’s Algorithm
bl.ocks.org
bl.ocks.org
this also makes the mazes generated by the algorithm the most annoying to solve without a computer, but they are the most resistant to be searched in reverse of all the forward building algorithms (without explicit honeypots for trapping reversers)
Came to say that. I see a lot of what looks like the letter E in there. Many tiny dead ends. Really hard to visually follow a path through, and I can only imagine how not-fun it would be to play a first person game in there.
(My code uses toroidal topology, which is why you can see things going off the edge and coming back on the other side.)
And things like varying whether new neighbors are added to the head or tail of the list adds a little perceptible chaos. It's too bad it looks like my demo site is down right now.
There's a (old, badly documented) JS demo here with about 6 variant algorithms: https://github.com/j-s-n/mazes-js
And a better documented but still out of date Python example (that hand-encodes an animated gif here): https://github.com/j-s-n/mazes