Question: Need help please with the coding for this expectimax search. Please and thank you Implement the ExpectimaxAgent, which is useful for modeling probabilistic behavior of
Need help please with the coding for this expectimax search. Please and thank you

Implement the ExpectimaxAgent, which is useful for modeling probabilistic behavior of agents who may make suboptimal choices. As with the search and constraint satisfaction problems covered in CSE 5120, the impressive feature of this algorithm is its general applicability. Note: The correct implementation of expectimax will lead to Pacman losing some of the tests. This is not a problem: as it is correct behavior, it will pass the tests. Evaluation: You can debug your implementation on small the game trees using the command: python autograder.py q q 4 Debugging on these small and manageable test cases is recommended and will help you to find bugs quickly. Once your algorithm is working on small trees, you can observe its success in Pacman. Random ghosts are not optimal minimax agents, and so modeling them with minimax search may not be appropriate. ExpectimaxAgent, does not take the min over all ghost actions, but the expectation according to the agent's model of how the ghosts act. To simplify your code, assume you will only be running against an adversary which chooses amongst their getLegalActions uniformly at random (read about uniform distribution for further understanding). To see how the ExpectimaxAgent behaves in Pacman, run: python pacman.py - p ExpectimaxAgent -1 minimaxclassic - a depth=3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
