4-Minimax and MDPs_solutions

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

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

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 diﬀerence 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 identiﬁed. 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 ﬁrst, followed by the lower left ghost, then the top right ghost. 1

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

View Full Document
(a) Build the expectimax tree. What is Pacman’s optimal move? Play W for an expected payoﬀ of 3. (b) What would pacman do if it was using minimax instead? 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 payoﬀ of -502. Instead, we could earn a better payoﬀ 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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online