A visual comparison of A*, BFS, and DFS pathfinding algorithms on a dynamic rescue grid. Developed as academic coursework for Artificial Intelligence - Lab (AL2002) at FAST NUCES Karachi.
| Cell | Value | Cost | Passable? |
|---|---|---|---|
| Open | 0 | 1 | Yes |
| Smoke | 1 | 5 | Yes (costly) |
| Fire | 2 | ∞ | No |
| Wall | 3 | ∞ | No |
| Start | 4 | 1 | Yes |
| Goal | 5 | 1 | Yes |
- A*: Informed search with Manhattan heuristic. Finds optimal cost-weighted paths.
- BFS: Uninformed search. Guarantees optimal hop-count paths (not cost-weighted).
- DFS: Uninformed search. Explores one branch fully before backtracking.
- Backend: FastAPI on Python 3.10+
- Frontend: React + TypeScript + HTML5 Canvas
- Package managers: uv (backend), Bun (frontend)
- Python 3.10+
- uv
- Bun
Open two terminals from the repository root.
uv --project backend sync
uv --project backend run uvicorn backend.main:app --reload --port 8000Backend URL: http://127.0.0.1:8000
cd frontend
bun install
bun run startFrontend URL: http://localhost:3000
cd frontend
bun run build
bun x tsc --noEmituv --project backend run python -m compileall backenduv --project backend run uvicorn backend.main:app --port 8000POST /api/search- Request body:
grid,start,goal,algorithm - Response body:
algorithm,path,explored,path_cost,cells_explored,execution_time_ms
This project is licensed under the MIT License — see the LICENSE file for details.



