1 / 10

Quiz 4 : Minimax

Quiz 4 : Minimax. Minimax is a paranoid algorithm. True Using alpha-beta pruning does not affect the solution. True Every game is also a general search problem. False Every general search problem is also a game. True Typically the best algorithm for game playing is DFS. False

merv
Download Presentation

Quiz 4 : Minimax

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Quiz 4 : Minimax • Minimax is a paranoid algorithm.True • Using alpha-beta pruning does not affect the solution. True • Every game is also a general search problem. False • Every general search problem is also a game. True • Typically the best algorithm for game playing is DFS. False • Evaluation functions still guarantee optimal outcomes. False • It is always best to assume the worst case. False • Checkers is still an open problem. False • Why did Pacman starve?

  2. CSE511a: Artificial IntelligenceSpring 2012 Lecture 7: Expectimax Search 02/05/2012 Kilian Weinberger Many slides over the course adapted from either Dan Klein, Stuart Russell or Andrew Moore

  3. Deterministic Games • Many possible formalizations, one is: • States: S (start at s0) • Players: P={1...N} (usually take turns) • Actions: A (may depend on player / state) • Transition Function: SxA  S • Terminal Test: S  {t,f} • Terminal Utilities: SxP  R • Solution for a player is a policy: S  A

  4. Adversarial Games • Deterministic, zero-sum games: • Tic-tac-toe, chess, checkers • One player maximizes result • The other minimizes result • Minimax search: • A state-space search tree • Players alternate turns • Each node has a minimax value: best achievable utility against a rational adversary max 5 Minimax values:computed recursively min 5 2 8 2 5 6 Terminal values:part of the game

  5. Computing Minimax Values • Two recursive functions: • max-value maxes the values of successors • min-value mins the values of successors def value(state): If the state is a terminal state: return the state’s utility If the next agent is MAX: return max-value(state) If the next agent is MIN: return min-value(state) def max-value(state): Initialize max = -∞ For each successor of state: Compute value(successor) Update max accordingly Return max

  6. Recap: Resource Limits • Cannot search to leaves • Depth-limited search • Instead, search a limited depth of tree • Replace terminal utilities with an eval function for non-terminal positions • Guarantee of optimal play is gone • Replanning agents: • Search to choose next action • Replan each new turn in response to new state max 4 min min -2 4 -1 -2 4 9 ? ? ? ?

  7. Alpha-Beta Pruning Example 3 ≤2 ≤1 3 3 12 2 14 5 1 ≥8 a is MAX’s best alternative here or above b is MIN’s best alternative here or above 8

  8. Alpha-Beta Pruning Properties • This pruning has no effect on final result at the root • Values of intermediate nodes might be wrong! • Good child ordering improves effectiveness of pruning • With “perfect ordering”: • Time complexity drops to O(bm/2) • Doubles solvable depth! • Full search of, e.g. chess, is still hopeless…

  9. Expectimax Search Trees • What if we don’t know what the result of an action will be? E.g., • In solitaire, next card is unknown • In backgammon, die roll unknown. • In minesweeper, mine locations • In pacman, the ghosts act randomly • Can do expectimax search • Chance nodes, like min nodes, except the outcome is uncertain • Calculate expected utilities • Max nodes as in minimax search • Chance nodes take average (expectation) of value of children • Later, we’ll learn how to formalize the underlying problem as a Markov Decision Process max chance 10 4 5 7

More Related