Growing Tree maze algorithm

Growing Tree keeps a list of active cells and grows the maze from one of them at each step. How it picks that cell decides the maze's look.

How it works

Start with one cell in the list. Pick a cell from the list, carve to a random unvisited neighbour and add that neighbour to the list; if it has no unvisited neighbours, remove it. Repeat until the list is empty.

Always picking the newest cell makes it the recursive backtracker; always picking a random cell makes it like Prim's. This version picks the newest cell half the time and a random one otherwise, so it mixes long corridors with lots of short branches.

What to watch for

Watch it run off in long snakes like the backtracker, then jump somewhere random and sprout a new branch.

Properties

Texture
A mix of long corridors and short branches
Dead ends
Medium
Uniform
No
Speed
Fast
Memory
The active list

Try it

Open the studio to carve your own Growing Tree maze at any size, solve it with up to four algorithms, and save the video.

FAQ

Is Growing Tree a different algorithm or a family?

A family. The rule for picking the next cell turns it into the backtracker, Prim's, or anything in between.

All maze algorithms

Pro

and undefined are part of Pro

  • All 12 generators and 12 solvers
  • Hexagon, triangle and circle grids; heart, star and 6 more outlines
  • Giant mazes, up to 201×201, any width and height
  • Custom colours, 7 more themes, flood styles, clean no-label videos
  • Any speed from 0.25× to 4×, any amount of loops
  • 4 more scales and 3 more instruments
  • Titles on your videos, custom timing, any start and goal
  • Race and gauntlet videos, with or without the watermark