Home▸Algorithms & AI▸Maze Generation Algorithms: Spanning Trees, Dead Ends and Solution Length (2D)

Maze Generation Algorithms: Spanning Trees, Dead Ends and Solution Length (2D)

Top-down view of the same maze model as the 3D scene: six generation algorithms, depth-tinted floor, hedge walls, the BFS solution and live charts of dead ends and remaining regions while carving.

Algorithms & AI2DEasy60 FPS📱 Mobile-adapted🟠 Blender⇄ 3D version
Maze Generation Algorithms: Spanning Trees, Dead Ends and Solution Length (2D) ↗ Open standalone

Watch six maze algorithms carve a spanning tree of the grid: recursive backtracker, Prim, Kruskal, Wilson, Aldous-Broder and binary tree. Choose the size, seed and how many dead ends to open into loops, then compare dead-end fraction, corridor lengths and the shortest solution. A Blender-built hedge maze with a runner, with numerical checks (Kirchhoff tree counts, chi-square uniformity, the 0.2945 leaf limit) built in.

⚙ Under the hood

Top-down view of the same maze model as the 3D scene: six generation algorithms, depth-tinted floor, hedge walls, the BFS solution and live charts of dead ends and remaining regions while carving.

Maze GenerationSpanning TreeWilson AlgorithmGraph TheoryRecursive BacktrackerDead Ends

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)