Sidewinder Maze

by jens
See Code Download Embed
Quick exploration of the "Sidewinder" Maze-making algorithm.

I got the idea to play with this from a tweet by Martin Kleppe: https://twitter.com/aemkei/status/1386093406980542465

This is what Martin says about it:

The "Sidewinder" algorithm is one of the easiest way to draw a "perfect" maze with no loops and no isolation:

Randomly carve a couple of cells to the right. Then go back and choose one of the last cells and carve to the top. Proceed until the end of a row and go to the next.

Also check out the explanation and materials referred to in Martin's tweet.

Created April 25, 2021

Last updated April 26, 2021

Published April 26, 2021