Maze Solver
Watch pathfinding algorithms navigate through procedurally generated mazes.
Generation Algorithms
- Recursive Backtracker - DFS-based, creates long winding passages
- Prim's - Grows from random frontier cells, more branching
- Kruskal's - Union-find based, uniform distribution
- Binary Tree - Fast but biased toward corner
Solving Algorithms
- A* - Optimal path using heuristic (Manhattan distance)
- Dijkstra - Optimal path, explores uniformly
- BFS - Guarantees shortest path in unweighted graphs
- DFS - Fast but may not find shortest path
- Greedy - Follows heuristic only, fast but suboptimal
Code Editor
Click the </> button to open the code editor. You can modify algorithms and click "Run" to test your changes.
Available helpers: getNeighbors(pos), heuristic(a, b), visit(pos), markSolution(path)
Controls
- G - Generate new maze
- S - Start solving
- C - Clear solution
- E - Toggle code editor
- Escape - Stop animation