Project Description
A visual pathfinding sandbox built with Python and pygame. Four different algorithms
navigate a Snake game in real time, with live path drawing and a benchmark mode that
runs all agents on the same food sequence and compares their score, move count,
efficiency, and grid coverage side-by-side.
- Greedy — always moves toward the food using Manhattan distance
- BFS — finds the guaranteed shortest path to food
- A* — BFS with a Manhattan heuristic for faster convergence
- Hamiltonian cycle — covers the entire grid; never dies, but slow
- Adjustable grid size (30–120 × 20–90), speed control, and resizable window
Technologies
Graph Algorithms (BFS, A*, Greedy, Hamiltonian)