项目作者: gargimahale

项目描述 :
🐍 AI for the Snake Game. Implemented and performed comparisons between 4 different types of solvers, i.e Path, Greedy, Hamilton and DQN Solvers.
高级语言: Python
项目地址: git://github.com/gargimahale/Snake.git
创建时间: 2020-09-06T06:43:04Z
项目社区:https://github.com/gargimahale/Snake

开源协议:

下载


Snake

The 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 as soon as possible.

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.

  1. $ pip3 install -r requirements.txt
  2. # Use -h for more details
  3. $ python3 run.py [-h]

Run unit tests:

  1. $ python3 -m pytest -v