This project is part of the CS188: Introduction to Artificial Intelligence course at UC Berkeley. It focuses on implementing various AI techniques to enable Pacman to navigate mazes, collect food, and avoid ghosts. The project is divided into multiple assignments, each exploring different AI concepts such as search algorithms, reinforcement learning, and adversarial planning.
The project consists of multiple parts, each addressing a specific aspect of AI:
- Search (Project 1): Implement search algorithms (DFS, BFS, UCS, A*) to find optimal paths in the Pacman world.
- Multi-Agent (Project 2): Develop adversarial agents using minimax, alpha-beta pruning, and expectimax.
- Logic (Project 3):
- Bayes Nets (Project 4): Apply probabilistic inference to track ghosts using hidden Markov models.
- Machine Learning (Project 5): Use perceptron and neural networks to classify digits.
- Python 3.x
- NumPy
- Matplotlib (for visualization)
- Additional dependencies as required by specific projects (e.g., SciPy for machine learning)
- Clone the repository:
git clone https://github.com/your-repo/pacman-project.git cd pacman-project
- Ensure Python dependencies are installed:
pip install -r requirements.txt
Each part of the project includes specific scripts to run different AI algorithms:
-
Search Algorithms:
python pacman.py -l mediumMaze -p SearchAgent -a fn=bfs
(Replace
bfs
withdfs
,ucs
, orastar
as needed.) -
Multi-Agent Algorithms:
python pacman.py -p MinimaxAgent -l trappedClassic -a depth=2
-
Reinforcement Learning:
python pacman.py -p QLearningAgent -x 2000 -n 2010 -l smallGrid
Refer to each project’s README
file for more detailed usage instructions.
Each project comes with an autograder to test implementations:
python autograder.py
This project is based on the UC Berkeley CS188 Pacman AI framework.
This project is for educational purposes only and follows the policies outlined by UC Berkeley's CS188 course.