Pathfinding Visualizer - Learn AI Search Algorithms

🤖 Pathfinding Visualizer

Draw walls, place the robot and target, then watch AI search algorithms find the way.

Quick Maze:
🗺️ Grid — Click to draw walls, drag to paint 20×15 cells
Empty
Wall
Start
End
Visited
Path
Current
50ms
Algorithm: A* Search
Cells Visited: 0
Path Length:
Time:
📊 Algorithm Comparison A* Search: Uses distance heuristic — fastest for pathfinding. Like a GPS that "feels" the destination.

Dijkstra: Explores evenly in all directions — guaranteed shortest path but slower. Like flood filling.

BFS: Breadth-first — finds shortest path in unweighted grids. Like ripples in a pond.

DFS: Depth-first — explores one path fully before backtracking. Can be fast or get stuck in mazes.
How to use: Select a Drawing Tool and click/drag on the grid to draw walls, place the 🤖 robot (start), and 🎯 target (end). Pick an Algorithm and hit Start Search. Watch blue cells spread as the algorithm explores, then see the gold path trace back from target to start. Try different mazes and compare how many cells each algorithm visits. This is the exact math behind game NPCs, delivery drones, and Mars rovers!
Playful Logic