1 / 16

Game-Playing

Game-Playing. Read Chapter 6 Adversarial Search. Game Types. Two-person games vs multi-person chess vs monopoly Perfect Information vs Imperfect checkers vs card games Deterministic vs Non-deterministic go vs backgammon. Two-Person Games: Perfect Information.

ashanti
Download Presentation

Game-Playing

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. Game-Playing Read Chapter 6 Adversarial Search

  2. Game Types • Two-person games vs multi-person • chess vs monopoly • Perfect Information vs Imperfect • checkers vs card games • Deterministic vs Non-deterministic • go vs backgammon

  3. Two-Person Games: Perfect Information • BF = branching factor (average) • Chess: BF ~36 • expert level • Checkers: BF ~ 8, world champion • Othello: BF ~10, better world champion • Go: BF ~200 • $2 million prize

  4. MiniMax Algorithm (perfect information, 2 person game) • Assume: evaluation of terminal position • Win = +1, Loss = -1, Draw = 0. • Descendants of max node is min node, etc. • Algorithm: recursive • Value Max Node = max(descendants of node) • Value Min Node = min(descendants of node) • Value of terminal node: by evaluation function • Applies to any tree with values assigned to leaves. • Needed if full tree too large.

  5. MiniMax Example

  6. Optimal Play • Make move that yields highest minimax score. • Computation: search: depth-first • Time = b^d • Memory= b*d

  7. Applied to Chess • Average game is 40+ moves • Tree to large to reach terminal positions • Static board evaluation of worthiness • Uses Partial Tree • MiniMax yields optimal value for restricted tree, with values assigned by evaluation. • No theorems connecting valuation on partial tree to estimates for complete tree.

  8. Alpha-Beta Algorithm • Yields exactly same value as minimax • Knuth analyzed: time or nodes = O(b^d/2) • Doubles depth of search with same time. • Constant depends on ordering of nodes • Iterative deepening alpha/beta achieves better ordering. (reorder after depth)

  9. Alpha-beta Algorithm • Each node is assigned a range of values: [alpha,beta]. The real value will lie between. • The root is assigned [-inf,+inf]. • For any max node N with values [A,B] • if a son has value >=C, then N has new range [C,B]. • If interval is empty, all nodes below cut. • For any min node N with values [A,B] • if son has value <=D, then N updated to [A,D]. • Formal code in text. • http://www.cs.mcgill.ca/~cs251/OldCourses/1997/topic11/

  10. Alpha-Beta Example

  11. Alpha-Beta Example

  12. (1,2,2) Nim

  13. Multi-player Games • Extension of minimax • assign a vector of values to each position • vector has value relative to each player • Each player maximizes choice • Equals minimax for 2 person game • No variations like alpha-beta

  14. Games with Uncertainty • Card games like hearts or bridge • Backgammon (roles of dice) • Expectimax • Does it work? • Theoretically nice, but where’s the meat – for what games was it successful?

  15. Certainty from Uncertainty • Simulation • Replace unknown world by specific world • simulate (or use alpha-beta) • Each simulation yields a play • Vote • Works for hearts and bridge play • bridge high level card play can’t make information gathering plans

  16. What about War • Games are games – restricted uncertainty • What are the operators in war? • unknown effects • unknown number • What is the state? • unknown

More Related