Skip to content

HarmanBhutani/snake-harman_AI

Repository files navigation

SnakeGame-Harman_AI

Once you will have all the libraries available that are mentioned in requirements , you can directly run this project . Please let me know if you face any issue . You can mail me at byteharman0101@gmail.com

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 ASAP.

Algorithms >

Experiments

We use 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 1000 episodes):

Solver Demo (optimal) Average Length Average Steps
Hamilton 63.93 717.83
Greedy 60.15 904.56
DQN
(experimental)
24.44 131.69

Installation

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

$ pip3 install -r requirements.txt

# Use -h for more details
$ python3 run.py [-h]

Run unit tests:

$ python3 -m pytest -v

License

See the LICENSE file for license rights and limitations.

About

Developed a Snake game using Machine learning algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages