A Perfect Snake AI
Uses A* pathfinding and a Hamiltonian cycle for flawless play.
View Source