Snake Game with Reinforcement Learning is a project that combines classic game development with artificial intelligence. The Snake game is implemented using the Pygame library, and an AI agent is trained to play the game using the Q-learning algorithm powered by PyTorch. The goal is to showcase the implementation of a reinforcement learning algorithm in a gaming environment.
- Snake Game: Classic Snake game implemented using Pygame.
- Reinforcement Learning: Q-learning algorithm applied for training an AI agent.
- PyTorch Integration: Utilizing PyTorch for neural network implementation.
- Flexible and Extendable: Easily extendable for experimenting with different algorithms or game modifications.
- Clone the repository:
git clone https://github.com/iarslankhalid/RL_snake_game.git cd RL_snake_game pip install -r requirements.txt
- Setup: Complete all the Installation process
- Run
agent.py
file - You can use the pre-trained parameters by setting
LOAD_PREVIOUS_MODEL = True
inmodel.py
- Or you can train the snake from start.
- Explore & Experiment:
- Tweak parameters and configurations in model.py for customization.
- Extend the project by implementing additional features or experimenting with different reinforcement learning algorithms.
This project is licence under MIT Licence
- Email: [email protected]
- LinkedIn: https://www.linkedin.com/in/iarslankhalid/