1 / 16

Lecture 9 of 14

Lecture 9 of 14. Game Tree Search: Minimax and Alpha-Beta. Friday, 10 September 2004 William H. Hsu Department of Computing and Information Sciences, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Chapter 6, Russell and Norvig 2e. Lecture Outline. Today’s Reading

ketan
Download Presentation

Lecture 9 of 14

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. Lecture 9 of 14 Game Tree Search: Minimax and Alpha-Beta Friday, 10 September 2004 William H. Hsu Department of Computing and Information Sciences, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Chapter 6, Russell and Norvig 2e

  2. Lecture Outline • Today’s Reading • Sections 6.1-6.4, Russell and Norvig 2e • Recommended references: Rich and Knight, Winston • Reading for Next Class: Sections 6.5-6.8, Russell and Norvig • Games as Search Problems • Frameworks: two-player, multi-player; zero-sum; perfect information • Minimax algorithm • Perfect decisions • Imperfect decisions (based upon static evaluation function) • Issues • Quiescence • Horizon effect • Need for pruning • Next Lecture: Alpha-Beta Pruning, Expectiminimax, Current “Hot” Problems • Next Week: Knowledge Representation – Logics and Production Systems

  3. Overview • Perfect Play • General framework(s) • What could agent do with perfect info? • Resource Limits • Search ply • Static evaluation: from heuristic search to heuristic game tree search • Examples • Tic-tac-toe, connect four, checkers, connect-five / Go-Moku / wu3 zi3 qi2 • Chess, go • Games with Uncertainty • Explicit: games of chance (e.g., backgammon, Monopoly) • Implicit: see project suggestions! Adapted from slides by S. Russell, UC Berkeley

  4. Games versus Search Problems • Unpredictable Opponent • Solution is contingency plan • Time limits • Unlikely to find goal • Must approximate • Plan of Attack • Algorithm for perfect play (J. von Neumann, 1944) • Finite horizon, approximate evaluation (C. Zuse, 1945; C. Shannon, 1950, A. Samuel, 1952-1957) • Pruning to reduce costs (J. McCarthy, 1956) Adapted from slides by S. Russell, UC Berkeley

  5. Types of Games • Information: Can Know (Observe) • … outcomes of actions / moves? • … moves committed by opponent? • Uncertainty • Deterministic vs. nondeterministic outcomes • Thought exercise: sources of nondeterminism? Adapted from slides by S. Russell, UC Berkeley

  6. Minimax Figure 5.2 p. 125 R&N Adapted from slides by S. Russell, UC Berkeley

  7. Minimax Algorithm:Decision and Evaluation  what’s this?  what’s this? Figure 5.3 p. 126 R&N Adapted from slides by S. Russell, UC Berkeley

  8. Properties of Minimax • Complete? • … yes, provided following are finite: • Number of possible legal moves (generative breadth of tree) • “Length of game” (depth of tree) – more specifically? • Perfect vs. imperfect information? • Q: What search is perfect minimax analogous to? • A: Bottom-up breadth-first • Optimal? • … yes, provided perfect info (evaluation function) and opponent is optimal! • … otherwise, guaranteed if evaluation function is correct • Time Complexity? • Depth of tree: m • Legal moves at each point: b • O(bm) – NB, m 100, b 35 for chess! • Space Complexity? O(bm) – why? Adapted from slides by S. Russell, UC Berkeley

  9. Resource Limits Adapted from slides by S. Russell, UC Berkeley

  10. Static Evaluation Function Example:Chess Figure 5.4(c), (d) p. 128 R&N Adapted from slides by S. Russell, UC Berkeley

  11. Do Exact Values Matter? Adapted from slides by S. Russell, UC Berkeley

  12. Cutting Off Search [1] Adapted from slides by S. Russell, UC Berkeley

  13. Cutting Off Search [2] • Issues • Quiescence • Play has “settled down” • Evaluation function unlikely to exhibit wild swings in value in near future • Horizon effect • “Stalling for time” • Postpones inevitable win or damaging move by opponent • See: Figure 5.5 R&N • Solutions? • Quiescence search: expand non-quiescent positions further • “No general solution to horizon problem at present Adapted from slides by S. Russell, UC Berkeley

  14. Why Prune? Figure 5.6 p. 131 R&N Adapted from slides by S. Russell, UC Berkeley

  15. Summary Points • Introduction to Games as Search Problems • Frameworks • Two-player versus multi-player • Zero-sum versus cooperative • Perfect information versus partially-observable (hidden state) • Concepts • Utility and representations (e.g., static evaluation function) • Reinforcements: possible role for machine learning • Game tree • Family of Algorithms for Game Trees: Minimax • Propagation of credit • Imperfect decisions • Issues • Quiescence • Horizon effect • Need for pruning

  16. Terminology • Game Graph Search • Frameworks • Two-player versus multi-player • Zero-sum versus cooperative • Perfect information versus partially-observable (hidden state) • Concepts • Utility and representations (e.g., static evaluation function) • Reinforcements: possible role for machine learning • Game tree: node/move correspondence, search ply • Family of Algorithms for Game Trees: Minimax • Propagation of credit • Imperfect decisions • Issues • Quiescence • Horizon effect • Need for (alpha-beta) pruning

More Related