Using Pac-Man in your AI Course
You are welcome to use the Pac-Man projects and infrastructure for any educational or personal use. We ask only that you:
- Please do not distribute or post solutions to any of the projects.
- Please retain the attribution text at the top of each Python file.
- Talk to us before re-releasing, repacking, or extending the projects.
Additionally, if you have any questions, feedback, or bug reports about our projects, there are two ways of getting them addressed. (1) An public instructor forum through Piazza, in which you will need to contact us to get an access code to join, and (2) a private form linked here (preferably for bug reports). For more information, see the Contact section.
There are two ways of using these materials:
(1) In the navigation toolbar at the top, hover over the "Projects" section and you will find links to all of the project documentations. Each project contains a .zip file that includes a starter implementation and an autograder that students can run locally to check for correctness of their implementations. Note: Instructors need to set up their own infrastructure to collect the submissions of the students. Some options are to retrieve your students' scores via email, or to build your own web service. (But you are on your own for this!)
(2) Alternatively, you can request to use the materials (optionally along with other CS188 materials) via the edX platform, which hosts Berkeley's local and global offerings of CS188. If you are interested in being an alpha partner, please contact us at firstname.lastname@example.org.
Using the Local Autograder
Inside each project folder, we have provided a local autograder and a set of test cases for students to evaluate their code. The local autograder is a file called
autograder.py. To run the autograder, run the command:
You can also select individual questions for the autograder to run. For example, if you wanted to run question 2 on a project, you would run the command:
python autograder.py -q q2
The test cases are within the
test_cases directory. For each test case, we provide the test suite along with the solution of the test case.
About the Pacman Capture The Flag Contest
We have provided the specifications for the optional capture-the-flag final contest, which contain all of the instructions and files that the students. At this point in time, we will not be providing the infrastructure for running the contest server. Instructors will need to set up their own infrastructure in order to host the contest.
Which Files to Modify?
Each project comes with a string of many files; here are the files that students should only need to modify:
addition.py, buyLotsOfFruit.py, shopSmart.py
Multiagent Search Project:
Reinforcement Learning Project:
valueIterationAgents.py, qlearningAgents.py, analysis.py
perceptron.py, perceptron_pacman.py, mira.py, dataClassifier.py, answers.py
Pacman Capture The Flag Contest: