This project implements a game based on search agents where character 1 (Gon) must find his enemy character 2 (Neferpitou) while avoiding character 3 (Killua), who tries to intercept him using different search algorithms.
The project consists of a maze where two agents interact:
- Gon: Uses depth-limited search to find Neferpitou
- Killua: Mainly uses breadth-first search, but with a 40% chance switches to A* search
- Power-up: A ramen that halves the movement cost when picked up
- Implementation of three search algorithms: depth-limited, breadth-first, and A*
- Graphical interface developed with Pygame
- Power-up system that affects movement cost
- Probabilistic behavior for the Killua agent
- Multiple game ending scenarios
- Python 3.8 or higher
- Pygame 2.0 or higher
Follow these steps to install and set up the project:
- Clone the repository:
git clone https://github.com/valtimore/MazeGameIA.git cd MazeGameIA - Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows
- Install the dependencies:
pip install -r requirements.txt
To start the game, run:
python main.pyThe game runs automatically. Agents move according to their search algorithms. Watch how they interact in the maze.
This project is licensed under the MIT License. See the LICENSE file for details.