Main Library Used: Pytorch & Pygame
Repository is fully annotated.
git pull https://github.com/PhantomKing99999/snakeGame.git
cd snakeGame
pip install -r requirements.txt
Loading previous weights is enabled by default. To disable loading previous weights and to override previous weights replace train(loadSave=True) with train(loadSave=False)
Then Run python3 agent.py
Inspired by https://github.com/patrickloeber/snake-ai-pytorch Created following https://youtube.com/playlist?list=PLqnslRFeH2UrDh7vUmJ60YrmWd64mTTKV&si=3zcyFWhU9Ck-zgms