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
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
Get step-by-step solutions from verified subject matter experts
