Welcome to PacmanRL, an academic project designed for the curricular unit of Unsupervised Learning. This project combines the classic Pacman game with the field of Reinforcement Learning (RL). The aim is to provide students with hands-on experience in developing and implementing RL algorithms, specifically Q-Learning and SARSA, to control Pacman.
The primary goal of PacmanRL is to create an RL agent that learns optimal strategies for navigating the maze, collecting pellets, and avoiding ghosts.
- Python Version: Python 3.11+
- Main Libraries:
- Pygame: A set of Python modules designed for writing video games.
- Gymnasium: A toolkit for developing and comparing reinforcement learning algorithms.
- MiniGrid: A minimalistic gridworld environment for reinforcement learning.
main.py
: Entry point of the game.game/
: Contains core game logic, including Pacman and ghost entities, and maze management.gui/
: Houses the graphical user interface components for rendering the game view.agents/
: Includes the RL agents for Q-Learning and SARSA.
To configure your project, you need to clone the repository, set up your development environment by installing the necessary dependencies, and familiarize yourself with the project's structure and objectives. Ensure you have Python 3.11 installed on your machine.
- Clone the repository:
git clone https://github.com/Sphincz/PacmanRL
- Navigate to the project directory:
cd PacmanRL
- Install dependencies:
pip install -r requirements.txt
- Run the game:
python main.py
- CA1: Correctness and efficiency of the RL algorithm development and implementation.
- CA2: Ability of the algorithm to make strategic decisions in navigating the maze and avoiding ghosts.
- CA3: Clarity, organization, and documentation of the code, as well as best coding practices.
- CA4: Demonstration of a profound understanding of reinforcement learning principles and their application in game strategy optimization.
- CA5: Creative approaches and solutions to challenges encountered during development.
- CA6: Presentation and defense of the project in the final evaluation session.