← 🤖 Algorithms

🏗️ Maze

Algorithm
Carved 0
Total cells625
Path length
Status Ready
In maze
Current cell
Walk path (Wilson)
Frontier (Prim)
BFS solution
Start
End
Select algorithm · Generate · Solve with BFS

🔲 Maze Generator & Solver

Four generation algorithms — DFS Backtracker, Prim's, Kruskal's and Wilson's loop-erased random walk — animated live. Then solve instantly with BFS to find the shortest path.

🔬 What It Demonstrates

Each algorithm creates a different "texture" of maze. DFS makes long corridors, Prim's creates branching patterns, Kruskal's is uniform, Wilson's is unbiased.

🎮 How to Use

Pick a generation algorithm and watch it carve the maze. Then click Solve to see BFS find the shortest path from start to finish.

💡 Did You Know?

Wilson's algorithm produces a perfectly uniform random spanning tree — every possible maze is equally likely. It uses loop-erased random walks, discovered by David Wilson in 1996.