🐍 Snake Path Planning Lab (2D): Hamiltonian Cycle, Shortcuts, BFS and Greedy
2D snake path planning lab: Hamiltonian cycle, safe shortcuts, BFS and greedy strategies with measured moves to fill the board checked against N^2(N^2-3)/4.
⚙ Under the hood
2D board view of a self-playing snake: Hamiltonian cycle, safe cycle shortcuts, BFS with tail check, unsafe BFS, greedy and manual play, with the measured moves to fill the board compared with the closed form N^2(N^2-3)/4 and three in-page checks.
SnakeHamiltonian CyclePath PlanningBFSAlgorithms
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install