Game-Playing PowerPoint PPT Presentation

presentation player overlay
About This Presentation
Transcript and Presenter's Notes

Title: Game-Playing


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 bd
  • Memory bd

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(bd/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 gtC, 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 ltD, then N updated to A,D.
  • Formal code in text.
  • http//www.cs.mcgill.ca/cs251/OldCourses/1997/top
    ic11/

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 wheres 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 cant 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
Write a Comment
User Comments (0)
About PowerShow.com