This project focuses on the artificial intelligence of the Snake game. The snake's goal is to eat the food continuously and fill the map with its bodies. Huge thanks to Chuyang Liu for his implementation of the game on python3. This is being tweaked to add implementations of the "almighty move" and random moves in order to make the snake more effeicient.
I used two metrics to evaluate the performance of an AI:
- Average Length: Average length the snake has grown to (max: 64).
- Average Steps: Average steps the snake has moved.
Test results (averaged over 100 episodes):
| Solver | Demo (optimal) | Average Length | Average Steps |
|---|---|---|---|
| Hamilton | ![]() |
60 | 700 |
Requirements: Python 3.5+ (64-bit) with Tkinter installed.
$ pip3 install -r requirements.txt
# Run the algorithm in real time
$ python3 run.py
See the LICENSE file for license rights and limitations.
