Eller's Algorithm maze algorithm
Eller's algorithm builds a maze one row at a time, remembering only the current row.
How it works
Each cell in the row belongs to a set. The algorithm randomly joins neighbouring cells in different sets, then, for every set, carves at least one passage down into the next row. The next row inherits those sets and the process repeats. On the last row it joins every remaining set so the maze is connected.
Because it only ever needs one row in memory, Eller's algorithm can make mazes of any height, even endless ones. How often it joins sideways versus down sets the texture.
What to watch for
Watch the maze appear strictly top to bottom, a row at a time, like a printer.
Properties
- Texture
- Mixed, set by join rates
- Dead ends
- Average
- Uniform
- No
- Speed
- Fast, one pass
- Memory
- One row
Try it
Open the studio to carve your own Eller's Algorithm maze at any size, solve it with up to four algorithms, and save the video. Or print one.
FAQ
Can Eller's algorithm make infinite mazes?
Yes. It only keeps the current row, so it can keep adding rows forever.