Snake Auto-Play

Description:

This demonstrates a recursive path-finding AI that I created for the Game Snake when I was an undergrad.

It back-tracks a path that minimizes the Manhatan distance between the food and the head of the snake while avoiding collisions.

This heuristic approach doesn't solve the game perfectly (If you want to do that you just have to follow a hamiltonian path). However, I find it very satisfying to watch.