/Python_Pygame_PyTorch_SnakeAI

Snake game uses PyTorch agent to learn how to play

Primary LanguagePythonMIT LicenseMIT

Snake AI

The game uses Reinforcement Learning to teach the snake how to play.

Follow tutorial from "Python Engineer"

https://www.youtube.com/watch?v=PJl4iabBEz0

Python setup

pip install pygame
pip install torch torchvision torchaudio
# pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install matplotlib ipython

Run with agent.py.
To train, uncomment train() from agent.py.