![]() Fill in ExpectimaxAgent, where your agentĪgent will no longer take the min over all ghost actions, but the expectation according to your agent's model of how the ghostsĪct. Random ghosts are of course not optimal minimax agents, and so modeling them with minimax search may not be appropriate. Again, the minimax values of the initial state in the minimaxClassic layout are 9, 8, 7 and -492 for depths 1, 2, 3 and 4 respectively. The AlphaBetaAgent minimax values should be identical to the MinimaxAgent minimax values, although the actions it selects can vary because of different tie-breaking behavior. Python pacman.py -p AlphaBetaAgent -a depth=3 -l smallClassic Ideally, depth 3 on smallClassic should run in just a few seconds per move or faster. You should see a speed-up (perhaps depth 3 alpha-beta will run as fast as depth 2 minimax). Again, your algorithm will be slightly more general than the pseudo-code in the textbook, so part of the challenge is to extend the alpha-beta pruning logic appropriately to multiple minimizer agents. Make a new agent that uses alpha-beta pruning to more efficiently explore the minimax tree, in AlphaBetaAgent. Make sure you understand why Pac-Man rushes the closest ghost in this case. Python pacman.py -p MinimaxAgent -l trappedClassic -a depth=3 Sometimes, this is the wrong thing to do with random ghosts, but minimax agents always assume the worst: When Pac-Man believes that his death is unavoidable, he will try to end the game as soon as possible because of the constant penalty for living.Don't worry if you see this behavior, question 5 will clean up all of these issues. He might even thrash around right next to a dot without eating it because he doesn't know where he'd go after eating that dot. He'll often thrash around without making progress. On larger boards such as openClassic and mediumClassic (the default), you'll find Pac-Man to be good at not dying, but quite bad at winning. ![]() In this project, you will not be abstracting to simplified states. All states in minimax should be GameStates, either passed in to getAction or generated via GameState.generateSuccessor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |