Training a model using negative or positive rewards is termed as Reinforcement Learning and extending it using neural networks is known as Deep Q-Learning. Using these two methodologies and libraries like PyGame, PyTorch, etc., this project report focuses on explaining how an agent can be trained to play the snake game and score as high as possible.
Creating a virtual environment
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
Use the package manager pip to install the dependencies.
pip3 install -r requirements.txt
pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
python3 agent.py
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.