I Created a PERFECT SNAKE A.I. - Summary

Summary

Here's a concise summary of the provided text:

The text describes the development of a Snake AI algorithm inspired by a Hamiltonian cycle. The author goes through various iterations of the algorithm, starting with A* and evolving it into a more efficient approach. They explain the concept of Hamiltonian cycles and how the algorithm follows this cycle, occasionally taking shortcuts. The new algorithm is faster but lacks the chaotic charm of the previous version. The author also mentions implementing it in a real game of Snake.

Facts

Here are the key facts extracted from the provided text:

1. The author is starting a new algorithm from scratch to improve the snake AI.
2. The new algorithm uses a Hamiltonian cycle to guide the snake.
3. This algorithm allows for shortcuts to be taken on the grid.
4. There are cases to be cautious about, such as avoiding the tail and not cutting off areas containing the tail.
5. The new algorithm follows the numbers more closely as the game progresses.
6. The author mentions not being a huge fan of the algorithm's lack of chaotic beauty compared to the previous one.
7. The new algorithm is considered fast and efficient.