Project 1
Project 1
Ms Pacman vs. Ghosts Controllers
1
Summary
Working with a partner, write three controllers (one for Ms Pac Man and
two for the ghosts) based on techniques from the class. One of the ghost
controllers should be designed to make the game fun to play, the other two
controllers should try to maximize score (or minimize it for the ghost controller).
This is a pair project. You must work with a partner to complete the
project. Both partners should contribute equally to the coding, testing, and
report-writing aspects of the project.
2
Grading
Your grade will be based on fulfilling the project requirements (having three
working controllers, using at least two techniques discussed in class, etc.)
and on the data that you collect (reported scores, user study notes, etc.).
Unless your reported scores demonstrate a distinct lack of effort, the actual
results of the tests you run won’t affect your grade, but the thoroughness
of reporting will. Note that if you don’t follow the submission instructions
properly, we may be unable to run your code, which will have a severe impact
on your grade. This project is worth 20% of your grade in the class.
3
Resources
This assignment uses code from the Ms Pac Man vs Ghosts Team Competition, which started in 2011. The competition website is at [1] , and it has
links for downloading a code package, as well as a page of rules. We’ll be using version 2.1.2 of the code from the downloads page [2] (the first download
link on that page). The direct URL is [3].
[1] http://www.pacman-vs-ghosts.net/
[2] http://www.pacman-vs-ghosts.net/software
1
[3] http://www.pacman-vs-ghosts.net/resources/code/mspacman_v2.1.2.zip
4
Requirements
1. You should use Java version 1.6 to run the code and when building your
.jar file for submission (see submission instructions below). If you use
a different version of Java, your code may not work in the evaluation
environment, which will impact your grade.
2. You must write three working controllers: one Ms Pac Man controller,
and two ghost team controllers. Each controller should be implemented
in a separate Java class (just like the example controllers that come
with the code). The controllers should each implement the appropriate Java interface (either PacManController or GhostController).
Your Ms Pac Man controller should be in the game.entries.pacman.
<groupname> package, while your ghost controllers should be in game.
entries.ghosts.fun.<groupname> and game.entries.ghosts.hard.
<groupname> packages, where <groupname> consists of the UCSC usernames for both partners concatenated, starting with the username that
is alphabetically first. So if pmawhort and mmateas worked together
for this project, the group name would be mmateaspmawhort. All of
your code should reside in the appropriate folder: if you have separate
AI class files, they should be in subfolders of game/entries/pacman/
<groupname> or of one of the ghost folders, as appropriate. You must
also ensure that your main controller classes (which implement one of
either the PacManController or GhostController interfaces provided
by the starting code) are called simply MyPacMan or MyGhosts in the
appropriate package. So for example, your fun ghost controller must
be the class game.entries.ghosts.fun.<groupname>.MyGhosts. If
your file structure is organized differently (e.g. you depend on files
outside of the appropriate project folder and the default game code, or
you name your controller class differently), your project will not run
on our test setup, and this will impact your grade.
3. Between all three controllers, you must use at least two of the AI techniques covered in class. Your implementation of each technique must
be its own Java class (or set of classes) implemented in a separate .java
2
file that at least one of your controllers imports. The data for your technique should be separated from the implementation of the technique
itself.
4. Your Ms Pac Man controller should be designed to optimize score. To
demonstrate this, you must report 100 scores from simulated games
between your controller and each of the RandomGhosts, Legacy, and
Legacy2TheReckoning ghost controllers included in the examples directory (300 scores total). Use the built-in runExperiment function to
simulate games. Report both the mean and standard deviation from
each set of scores, as well as overall.
5. Your first ghost team controller should be designed to minimize the
score of the opposing Ms Pac Man. You must report 100 scores running
your controller against each of the RandomNonRevPacMan, NearestPill
PacMan, and MyPacMan controllers (the first two are in the examples directory, the last controller comes with the code in the starterPackage
folder; you’ll need to modify Exec.java and move and rename the
MyPacMan.java file to get it working). Again, report mean and standard deviation for each case and overall.
6. Your final ghost team controller should be designed to play against a human opponent and maximize their fun. To demonstrate this, you need
to run four playtesting sessions with different subjects, letting them
play against both your controller and against the example Legacy controller. You should not tell your playtesters which controller is which,
and you should present them in a random order to the different testers.
During each playtest, take notes on any reactions the playtester has and
on how they behave. Afterwards, ask them to decide which controller
was more fun to play against. Submit a writeup of the playtests including an analysis of your controller compared to the Legacy controller in
terms of player experience.
7. You must write a technical writeup: a 1-3 page summary of the techniques that you used in your controllers. Include a description of which
techniques you used, how you implemented them, and why they were
effective. Include a diagram of the specific behavior data that you
used (for example, if you used an finite state machine, your diagram
3
should show the states and transitions that you used). This should be
submitted in .pdf format.
8. You must write a test writeup: a 1-2 page summary of your test results.
This should report your scores against the different example controllers
(600 scores in total), as well as your playtesting results. Use the notes
that you took during playtesting to give specifics about why your fun
controller did well or poorly compared to the legacy controller. Discuss the aggregate results from the automated testing in your report,
including means and standard deviations for each testing condition.
5
Directions
1. Start by downloading the code from the competition website (see the
Resources section above). Make sure that you can compile and run
the code (Exec is the main class; it should be run as game.Exec from
the directory above). If you’re having trouble getting the code to run,
post a question on Piazza or contact the TA directly (pmawhorter+
gaiecho@gmail.com). You should have the default code running by
the first class after this project is posted.
2. Next set up your own controller and AI classes. All of your code should
live in game.entries.pacman.<groupname>, game.entries.ghosts.
fun.<groupname>, or game.entries.ghosts.hard.<groupname> (see
the Requirements section above for details on how your code should be
structured). Modify Exec.java to run your classes instead of the example controllers (so for example, your modified Exec.java file should include the line: import game.entries.pacman.<groupname>.MyPacMan).
Again, if you have trouble with this step, get in touch with the TA in
a timely manner.
3. Start modifying your controller classes and building your AI code, using
techniques covered in class. Decide which techniques to use early, as
they will take some time to implement.
4. Finally, begin testing your controllers and improving them. At this
point, you can collect the results that you need to report and do
playtesting. You should leave at least a week before the assignment
is due to run tests and fix bugs in your code.
4
6
Submission
This assignment requires you to submit four things:
1. Source code: submit one .zip file that contains your controllers/ directory (i.e. when it is unzipped, it should result in a new controllers/
directory appearing, rather than in ghosts/ and pacman/ directories appearing). Per the project requirements, this zip should contain controllers/pacman/<groupname>, controllers/ghosts/fun/
<groupname>, and controllers/ghosts/hard/<groupname> folders,
and those directories should have MyPacMan.java or MyGhosts.java
files in them as appropriate.
2. An executable: submit a .jar file that will run your fun ghosts against
a human player.
3. Your technical writeup: submit this as a .pdf file.
4. Your test writeup: submit this as a .pdf file.
5
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising