
A visual playground to explore pathfinding algorithms like BFS, DFS, Dijkstra, Greedy Best-First, and A*.
Paint your own maze, drag start and goal nodes, and watch algorithms find their way — with optional turn-penalty to prefer straighter paths.*
-
Multiple algorithms
- BFS (shortest path on unweighted grids)
- DFS (explores deep, not always shortest)
- Dijkstra (optimal with weighted costs)
- Greedy Best-First (fast, not guaranteed optimal)
- A* (Dijkstra + heuristic → typically fastest optimal)
-
Interactive grid editor
- Draw walls (click+drag)
- Add weighted cells (Shift + drag)
- Erase with Alt/Option
- Drag the green (start) and red (goal) nodes
-
Visualization controls
- Step-by-step or animated
- Speed slider (instant to smooth)
- Turbo mode (instant computation, single render)
- Optional rendering of visited/frontier cells
-
Extras
- Random obstacle generator
- Clear/reset tools
- Turn-penalty: add cost for direction changes to prefer straight paths
-
Draw walls: click + drag
-
Weighted cells: hold Shift while dragging
-
Erase: hold Alt/Option while dragging
-
Move start/goal: drag green/red tiles
-
Keyboard shortcuts:
- R → Run
- P → Pause/Resume
- C → Clear path
- S → Step once
- G → Random obstacles
- Grid size: adjustable (5–80 rows, 5–120 columns)
- Speed: slider for smooth animation or instant solve
- Turbo: solve instantly without animations
- Turn Penalty: numeric value to penalize direction changes

