Welcome to the repository for the Berkeley Pacman Project! This repository contains the implementations of Project 1 and Project 2 from the CS188: Introduction to Artificial Intelligence course at UC Berkeley. The project focuses on using artificial intelligence techniques to control Pacman and solve a variety of problems.
In this repository, you will find the implementations of the following key projects:
-
Project 1: Search Algorithms
Search for paths for Pacman using search techniques like Depth-First Search, Breadth-First Search, A* Search, and more. -
Project 2: Multi-Agent Search and Reinforcement Learning
Using search algorithms and reinforcement learning to control multiple agents like Pacman and ghosts.
The goal of these projects is to learn and apply various AI algorithms, including search, heuristic search, and reinforcement learning techniques, in a fun and engaging way using the Pacman environment.
In Project 1, the goal was to implement search algorithms that help Pacman find the optimal path through a maze. The project includes the following algorithms:
-
Depth-First Search (DFS)
Explores as deep as possible before backtracking. -
Breadth-First Search (BFS)
Finds the shortest path by exploring all possible nodes level by level. -
A Search*
Uses heuristics to guide Pacman towards the goal more efficiently than BFS.
These algorithms were implemented to explore the maze and find the best path from Pacman's starting point to a target (such as food pellets). Each algorithm has its own strengths and trade-offs, and we tested them on different mazes to evaluate their performance.
In Project 2, the goal was to extend the search algorithms to multi-agent scenarios and implement reinforcement learning algorithms for Pacman.
Pacman now needs to plan moves while considering the behavior of the ghosts. We used Minimax Search and Alpha-Beta Pruning to determine Pacman's best moves while avoiding ghosts.
- Multi-Agent Search: Pacman must consider both the environment and ghost positions to make optimal decisions.
To get started with the Pacman project, follow these steps:
- Clone this repository:
git clone https://github.com/your-username/berkeley-pacman-project.git cd berkeley-pacman-project
- Run the project:
Instructions on how to run the Pacman AI will depend on the setup and files in this repository. Typically, you'd run a command to start the game or agent environment.
This project is a great way to learn and experiment with AI algorithms such as search algorithms and reinforcement learning. You can find more information on the CS188: Introduction to Artificial Intelligence course website: AI Berkeley