/snake-ai

Uses reinforcement learning to learn to play the snake game

Primary LanguagePythonMIT LicenseMIT

Snake AI

Demonstration

Alt text

Performance

Alt text

Trained for 100 iterations, tested for the next 100 iterations

How to use

  1. Download and install the snake environment from https://github.com/grantsrb/Gym-Snake
  2. Clone this repository and navigate to the directory
  3. Install the required dependencies
pip3 install -r requirements.txt
  1. Run the program
python3 snake.py