โ† back

maze

generate one ยท watch the algorithm ยท solve it.
size
generator
solver
speed
0 walls carved 0 cells 0 visited by solver โ€” shortest path
start end frontier visited solution
generators: DFS carves long winding corridors. prim's makes shorter dead-ends, more branching. kruskal's merges random edges โ€” very uniform. wilson's guarantees a uniform-random spanning tree (slow start, worth the wait).

solvers: BFS guarantees the shortest path. DFS plunges deep first โ€” fast but often suboptimal. A* uses manhattan distance as heuristic โ€” optimal and usually faster than BFS.