Skip to content

Teaching an AI to play snake using reinforcement learning.

Notifications You must be signed in to change notification settings

foldupcircle/snake-ai

Repository files navigation

Snake AI

Key Features

  • Implemented Reinforcement Learning with Pytorch
  • Optimized model by adjusting state and learning rate
  • Introduced obstacles to challenge the AI
  • Added levels of difficulty and a test framework to test validity of model

Testing the Model

  1. Clone the repo
  2. Run python test.py in your terminal inside the snake-ai folder
  3. Select a level (1-5) with 1 being the easiest, 5 the hardest
  4. Watch the AI try to play snake!

Training the Model

To observe how the model is trained, you can run python agent.py

About

Teaching an AI to play snake using reinforcement learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages