Skip to content

hbhatt687/Snake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

239 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

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.

Algorithm Research >

Experiments

I used two metrics to evaluate the performance of an AI:

  1. Average Length: Average length the snake has grown to (max: 64).
  2. Average Steps: Average steps the snake has moved.

Test results (averaged over 100 episodes):

Solver Demo (optimal) Average Length Average Steps
Hamilton 60 700

Installation

Requirements: Python 3.5+ (64-bit) with Tkinter installed.

$ pip3 install -r requirements.txt

# Run the algorithm in real time
$ python3 run.py 

License

See the LICENSE file for license rights and limitations.

About

Artificial intelligence of the Snake game.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%