- 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
- Clone the repo
- Run
python test.py
in your terminal inside the snake-ai folder - Select a level (1-5) with 1 being the easiest, 5 the hardest
- Watch the AI try to play snake!
To observe how the model is trained, you can run python agent.py
- This project is based on the snake AI course from freeCodeCamp, which can be found here: https://www.youtube.com/watch?v=L8ypSXwyBds&t=1236s&ab_channel=freeCodeCamp.org. After going through this course, I've made my own improvements to the project, including obstacles, levels, optimizing the model, and other features.