Question: 1 Reflex Agent [4 pts] Improve the ReflexAgent in multiAgents.py to play respectably. The provided reflex agent code provides some helpful examples of methods that

1 Reflex Agent [4 pts] Improve the ReflexAgent in "multiAgents.py" to play respectably. The provided reflex agent code provides some helpful examples of methods that query the GameState for information. A capable reflex agent will have to consider both food locations and ghost locations to perform well. Your agent should easily and reliably clear the testClassic layout: python pacman.py -p ReflexAgent -I testClassic Try out your reflex agent on the default mediumClassic layout with one ghost or two (and animation off to speed up the display): python pacman.py -frame Time 0 -p ReflexAgent -k 1 python pacman.py -frame Time 0 -p ReflexAgent -k 2 How does your agent fare? It will likely often die with 2 ghosts on the default board, unless your evaluation function is quite good. Note: Remember that newFood has the function asList() Note: As features, try the reciprocal of important values (such as distance to food) rather than just the values themselves. Note: The evaluation function you're writing is evaluating state-action pairs; in later parts of the project, you'll be evaluating states. Note: You may find it useful to view the internal contents of various objects for debugging. You can do this by printing the objects' string representations. For example, you can print newGhostStates with print(newGhostStates). Options: Default ghosts are random; you can also play for fun with slightly smarter directional ghosts using "-g Directional Ghost". If the randomness is preventing you from telling whether your agent is improving, you can use "-f" to run with a fixed random seed (same random choices every game). You can also play multiple games in a row with "-n". Turn off graphics with "-q" to run lots of games quickly. Grading: We will run your agent on the openClassic layout 10 times. You will receive 0 points if your agent times out, or never wins. You will receive 1 point if your agent wins at least 5 times, or 2 points if your agent wins all 10 games. You will receive an additional 1 point if your agent's average score is greater than 500, or 2 points if it is greater than 1000. You can try your agent out under these conditions with python autograder.py -q q1 To run it without graphics, use: python autograder.py -q q1 --no-graphics Don't spend too much time on this question, though, as the meat of the project lies ahead. 5
 1 Reflex Agent [4 pts] Improve the ReflexAgent in "multiAgents.py" to

Improve the ReflexAgent in "multiAgents py" to play respectably. The provided reflex agent code provides some helphul examples of mothods that query the Gamestate for information. A capable reflex agent will have to consider both food locations and ghost locations to perform well. Yout agent should easily and reliably clear the festClassic layout: Try out your refiex agent on the detault medtumClassic layout weth one ghost or two (and animation off to speed up the display): How does your agent tare? It will likely often die with 2 ghosts on the dotault board, unless your evaluation function is quite good. Note: Remember that newFood has the function astisto Note: As features, try the reciprocal of important values (such as distance to food) rather than just the values themselves: Note: The evaluation function youre writing is evalualing state-action pais; in later parts of the project, you'll be evaluating states. Note: You may find it usoful to view the internal contents af various objects for debugging. You can do this by printing the objects' string representations. For example, you can print newGhost States with print(newGhostStates). Options: Detault ghosts are random; you can also play for fun with slightly smarter directional ghosts using "-g DirectionalGhost". If the randomness is preventing you from telling whether your agent is improving, you can use "-f to run with a foxed random seed (same random choices every games quickly. Grading: We will run your agent on the openClassic layout 10 times. You will receive 0 points if your agent times out, or never wins. You will receive 1 point it your agent wins at least 5 times, or 2 points if your agent wins all 10 games. You will receive an additional i point if your agent's average score is greater than 500 , or 2 points if it is greater than 1000 . You can try your agent out under these conditions with To run it without graphics, use: Dont spend too much time on this question, though, as the meat of the propoct lies ahead

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!