The Pacman projects were developed for CS 188, Berkeley's introductory artificial intelligence course. They apply an array of AI techniques to a unified, occasionally entertaining game application. However, these projects don't focus on game-AI. Instead, they teach foundational AI concepts: informed state-space search, probabilistic inference in graphical models, and reinforcement learning with targeted reward shaping. These concepts underly real-world application areas such as natural language processing, computer vision and robotics. Pacman links together these concepts in a common environment.
In designing these projects, we hoped to help students quickly visualize the results of the agents and algorithms they implement. We also aimed to provide ample examples of well-written code, but not to force our students to wade through undue amounts of code they didn't write. Finally, we wanted a sufficiently challenging problem environment that some creativity was required on the part of the students; real-world AI problems are hard, and Pacman is too (though perhaps less so).
Pacman is written in pure Python and doesn't depend on any external packages. The core distribution is available as a zip archive. Unzip the archive and run python pacman.py to play. Try -h for options.
Each project extends the core with new problems to solve. See our current list of course projects for the set of projects developed so far.
If you are an instructor interested in using these projects for your course, contact John DeNero. We're happy to have other universities use these projects -- we only ask that you let us know, and that you share any improvements with us.
These projects have adapted the rules of classic Pacman to better facilitate the concepts we teach: movements are discretized, scores decay with time, and ghosts move according to fixed distributions. Download the code to see the specific rules, variants and constraints.