Sale!

Project 2: Multi-Agent Pacman CS 6300 solved

Original price was: $35.00.Current price is: $30.00.

Category:

Description

5/5 - (7 votes)

Artificial Intelligence
In this project, you will design agents for the classic version of Pacman, including ghosts. Along
the way, you will implement both minimax and expectimax search and try your hand at evaluation
function design.
As in Project 1, this project includes an autograder for you to grade your answers on your machine.
This can be run with the command:
python autograder.py
The code for this project consists of several Python files, some of which you will need to read and
understand in order to complete the assignment, and some of which you can ignore. Download
multiagent.zip from here http://ai.berkeley.edu/multiagent.html which will contain all the
code and supporting files.
1 Files to edit
For all the problems in this project, you would have to edit just one python file namely: multiagents.py, where all of your multi-agent search agents will reside.
2 Supporting files
The following python files would help you in understanding the problem and the get you familiar
with the different data structures and games states in Pacman.
1. pacman.py: The main file that runs Pacman games. This file describes a Pacman GameState
type, which you use in this project.
2. game.py: The logic behind how the Pacman world works. This file describes several supporting types like AgentState, Agent, Direction, and Grid.
3. util.py: Useful data structures for implementing search algorithms.
3 Multi-Agent Pacman(95 pts)
For all the problem titles described below, please refer to the link http://ai.berkeley.edu/
multiagent.html for the problem description and what is expected of each problem. As always
autograder has different test cases against which you can run your program to check the correctness.
Please ensure your code is readable and use comments in your code to make it more clear for the
person reading your code.
For the questions asked below, please ensure your response is brief and to the point. Please don’t
write paragraphs of text as responses to these questions.
1
3.1 Reflex Agent (19 pts)
1. (18 pts) Code Implementation
2. (1 pt) What was the feature you used for your evaluation function ?
3.2 Minimax (19 pts)
1. (18 pts) Code Implementation
2. (1 pt) When Pacman believes that his death is unavoidable, he will try to end the game as
soon as possible because of the constant penalty for living. Give an explanation as to why
the Pacman rushes to the closest ghost in this case ?
3.3 Alpha-Beta Pruning (19 pts)
1. (19 pts) Code Implementation
3.4 Expectimax (19 pts)
1. (18 pts) Code Implementation
2. (1 pt) You should find that your ExpectimaxAgent wins about half the time, while your
AlphaBetaAgent always loses. Explain why the behavior here differs from the minimax case.
3.5 Evaluation Function(19 pts)
1. (18pts) Code Implementation
2. (1 pt) What features did you use for your new evaluation function ?
4 Self Analysis (5 pts)
1. What was the hardest part of the assignment for you?
2. What was the easiest part of the assignment for you?
3. What problem(s) helped further your understanding of the course material?
4. Did you feel any problems were tedious and not helpful to your understanding of the
material?
5. What other feedback do you have about this homework?
2
5 Evaluation
Your code will be auto-graded for technical correctness. Please do not change the names of any
provided functions or classes within the code, or you will wreak havoc on the autograder. If your
code passes all the test cases in the autograder you would receive full points for the implementation.
However even if your code does not necessarily pass all the test cases, we would evaluate your code
and then award you partial points accordingly. In such cases it would be even more beneficial if
you could give a short description of what you tried and where you had failed and that would help
us in giving you better points.
6 Submission Instructions
• For the final submission you would be turning in a single zipped folder which should contain:
– Folder having all the python files.(multiagent folder in this case)
– PDF document containing your responses to the questions in Section 3 and 4.
• For those of you who are doing it in teams, it is enough that one of the team members makes
a submission. Please use the groups created in Canvas to upload your submission.
• Please ensure all the submissions are done through canvas. Please do not email the instructor
or the TA with your submission. Submissions made via email would not be considered for
grading.
• Naming:Your final upload should be named in the format < uid >-Proj2.zip where < uid >
is your Utah uid. Ex: u0006300-Proj2.zip
• For this project you should first unzip multiagent.zip and then will fill in portions of multiAgents.py Do not delete any of the files or change the names of any of those files in the project
directory.
• Written Answers: Place all written answers to questions in Section 3 and 4 in a single PDF
document. This should be clearly named in the format < uid >-Proj2-answers.pdf, where
< uid > is your Utah uid. Ex: u0006300-Proj2-answers.pdf. Please make sure to write your
name(s) at the top of the document!
3