Welcome to the Q-Learning Snake project! This repository contains the implementation of a Snake game using Q-Learning, a popular reinforcement learning algorithm. The project aims to develop an AI bot that learns to play the classic Snake game from scratch.
For a detailed explanation of the project, including the methodology and results, please refer to the project report.
To get started with the project, follow the instructions below to clone the repository and install the necessary dependencies.
First, clone the repository to your local machine:
git clone https://github.com/ChenghengLi/RL_Snake
cd RL_Snake
Navigate to the src
directory and install all required Python packages:
cd src
pip install -r requirements.txt
To run the Snake game with the Q-Learning AI, execute the following command inside the src
directory:
python play_game.py
- Q-Learning Algorithm: Implemented Q Learning and Deep Q Learning to train the AI to play Snake.
- Python Compatibility: Works with Python 3.7+.
- Dependencies: Includes necessary libraries such as
pygame
for game rendering.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes. Ensure that your code adheres to the existing coding standards.
This project is licensed under the MIT License. See the LICENSE
file for more details.
If you have any questions, feel free to contact the project maintainer at this chenghengli@ucla.edu.
Feel free to explore, contribute, and have fun with the Q-Learning Snake project!