4-Minimax and MDPs_solutions

4-Minimax and MDPs_solutions - CS188 Spring 2011 Section 4:...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS188 Spring 2011 Section 4: Minimax and MDPs 1 Suicidal Pacman Pacman is sometimes suicidal when doing a minimax search because of its worst case analysis. We will build here a small expectimax tree to see the difference in behavior. Consider the following rules: Ghosts cannote change direction unless they are facing a wall. The possible actions are east, west, south, and north (not stop). Initially, they have no direction and can move to any adjacent square. We use random ghosts which choose uniformly between all their legal moves. Assume that Pacman cannot stop If Pacman runs into a space with a ghost, it dies before having the chance to eat any food which was there. The game is scored as follows: -1 for each action Pacman takes 10 for each food dot eaten -500 for losing (if Pacman is eaten) 500 for winning (all food dots eaten) Given the following “trapped” maze, build the expectimax tree with max and chance nodes clearly identified. Use the game score as the evaluation function at the leaves. If you don’t want to make little drawings, all possible states of the game have been labeled for you on the next page: use them to identify the states of the game. Pacman moves first, followed by the lower left ghost, then the top right ghost. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(a) Build the expectimax tree. What is Pacman’s optimal move? Play W for an expected payoff of 3. (b) What would pacman do if it was using minimax instead? 2
Background image of page 2
If we treat the ghost nodes as minimizing nodes and run minimax, we see that if Pacman plays W the ghosts would play N,E respectively, and we would be stuck with a payoff of -502. Instead, we could earn a better payoff of -501 by immediately playing E: suicidal Pacman! (c) By changing the probabilities of action for the ghosts, can you get expectimax to make the same decision as minimax? One possible choice is for the ghosts to play N 99.95% of the time if N is legal and to choose randomly among
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

4-Minimax and MDPs_solutions - CS188 Spring 2011 Section 4:...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online