Projects
SourceLabGraph algorithms
Pathfinding Visualizer
Draw walls, scatter weighted terrain, or generate a maze, then watch Dijkstra, A*, BFS and DFS search for the target one node at a time.
VisualizeSpaceClear pathRClear boardC
Draw wallsWDraw weights (+10 cost)W
- Start
- Target
- Wall
- Weight · +10
- Frontier
- Visited
- Shortest path
Live metrics
IdleVisited
0
Path length
—
Total cost
—
Exec time
—
45 × 21 grid · 945 nodes
Dijkstra's Algorithm
Settles nodes in order of total cost from the start, relaxing each neighbour. Weights bend the wavefront around them.
weightedoptimal pathO((V + E) log V)
After a run, drag the markers or draw walls to re-route live.
- Space
- Visualize / pause
- R
- Clear path
- C
- Clear board
- W
- Switch wall / weight
Dijkstra's Algorithm
Settles nodes in order of total cost from the start, relaxing each neighbour. Weights bend the wavefront around them.
weightedoptimal pathO((V + E) log V)
After a run, drag the markers or draw walls to re-route live.
- Space
- Visualize / pause
- R
- Clear path
- C
- Clear board
- W
- Switch wall / weight