today nondeterministic games backgammon
play

Today Nondeterministic games: backgammon 0 1 2 3 4 5 6 7 8 - PowerPoint PPT Presentation

1 2 Today Nondeterministic games: backgammon 0 1 2 3 4 5 6 7 8 9 10 11 12 See Russell and Norvig, chapter 6 Game playing Nondeterministic games Games with imperfect information 25 24 23 22 21 20 19 18 17 16 15 14 13


  1. 1 2 Today Nondeterministic games: backgammon 0 1 2 3 4 5 6 7 8 9 10 11 12 See Russell and Norvig, chapter 6 • Game playing • Nondeterministic games • Games with imperfect information 25 24 23 22 21 20 19 18 17 16 15 14 13 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 3 4 Nondeterministic games in general Algorithm for nondeterministic games In nondeterministic games, chance introduced by dice, card-shuffling Expectiminimax gives perfect play Simplified example with coin-flipping: Just like Minimax , except we must also handle chance nodes: MAX . . . if state is a Max node then return the highest ExpectiMinimax-Value of Successors ( state ) if state is a Min node then 3 −1 CHANCE return the lowest ExpectiMinimax-Value of Successors ( state ) 0.5 0.5 0.5 0.5 if state is a chance node then return average of ExpectiMinimax-Value of Successors ( state ) MIN 2 4 0 −2 . . . 2 4 7 4 6 0 5 −2 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008

  2. 5 6 Pruning in nondeterministic game trees Pruning in nondeterministic game trees A version of α - β pruning is possible: A version of α - β pruning is possible: [ 1.5 , 1.5 ] [ − , 0.5 ] [ − , + ] [ − , + ] 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 [ 2 , 2 ] [ 1 , 1 ] [ 0 , 0 ] [ − , 1 ] [ − , + ] [ − , + ] [ − , + ] [ − , + ] 2 2 2 1 0 1 1 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 7 8 Pruning contd. Pruning contd. More pruning occurs if we can bound the leaf values More pruning occurs if we can bound the leaf values [ 1.5 , 1.5 ] [ −2 , 1 ] [ −2 , 2 ] [ −2 , 2 ] 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 [ 2 , 2 ] [ 1 , 1 ] [ −2 , 0 ] [ −2 , 2 ] [ −2 , 2 ] [ −2 , 2 ] [ −2 , 2 ] [ −2 , 2 ] 2 2 2 1 0 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008

  3. 9 10 Nondeterministic games in practice Digression: Exact values DO matter MAX Dice rolls increase b : 21 possible rolls with 2 dice Backgammon ≈ 20 legal moves (can be 6,000 with 1-1 roll) 2.1 1.3 21 40.9 depth 4 = 20 × (21 × 20) 3 ≈ 1 . 2 × 10 9 DICE .9 .1 .9 .1 .9 .1 .9 .1 As depth increases, probability of reaching a given node shrinks MIN 2 3 1 4 20 30 1 400 ⇒ value of lookahead is diminished α – β pruning is much less effective 2 2 3 3 1 1 4 4 20 20 30 30 1 1 400 400 TDGammon uses depth-2 search + very good Eval Behaviour is preserved only by positive linear transformation of Eval ≈ world-champion level Hence Eval should be proportional to the expected payoff Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 11 12 Games of imperfect information Example E.g., card games, where opponent’s initial cards are unknown Four-card bridge/whist/hearts hand, Max to play first 8 6 Typically we can calculate a probability for each possible deal 6 6 8 7 6 6 7 6 6 7 6 6 7 6 7 0 Seems just like having one big dice roll at the beginning of the game 4 2 9 3 4 2 9 3 4 2 3 4 3 4 3 9 2 Idea: compute the minimax value of each action in each deal, then choose the action with highest expected value over all deals Special case: if an action is optimal for all deals, it’s optimal. GIB, current best bridge program, approximates this idea by 1) generating 100 deals consistent with bidding information 2) picking the action that wins most tricks on average Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008

  4. 13 14 Example Example Four-card bridge/whist/hearts hand, Max to play first So far, we have seen the optimal play from Max in two different situations. 8 6 MAX 6 6 8 7 6 6 7 6 6 7 6 6 7 6 7 0 Now suppose that Max knows that Min has one or other of the two MIN 4 2 9 3 4 2 9 3 4 2 3 4 3 4 3 9 2 hands, but does not know which one. Is the same play still optimal? 8 6 MAX 6 6 8 7 6 6 7 6 6 7 6 6 7 6 7 0 MIN 4 2 9 3 4 2 9 3 4 2 3 4 3 4 3 9 2 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 15 16 Example Commonsense example Four-card bridge/whist/hearts hand, Max to play first Road A leads to a small heap of gold pieces Road B leads to a fork: 8 6 MAX 6 6 8 7 6 6 7 6 6 7 6 6 7 6 7 0 take the left fork and you’ll find a mound of jewels; MIN 4 2 9 3 4 2 9 3 4 2 3 4 3 4 3 9 2 take the right fork and you’ll be run over by a bus. 8 6 MAX 6 6 8 7 6 6 7 6 6 7 6 6 7 6 7 0 MIN 4 2 9 3 4 2 9 3 4 2 3 4 3 4 3 9 2 6 7 6 −0.5 4 3 8 MAX 6 6 8 7 6 6 7 6 6 7 6 6 7 MIN 4 2 9 3 4 2 9 3 4 2 3 4 3 9 2 6 7 −0.5 6 4 3 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008

  5. 17 18 Commonsense example Commonsense example Road A leads to a small heap of gold pieces Road A leads to a small heap of gold pieces Road B leads to a fork: Road B leads to a fork: take the left fork and you’ll find a mound of jewels; take the left fork and you’ll find a mound of jewels; take the right fork and you’ll be run over by a bus. take the right fork and you’ll be run over by a bus. Road A leads to a small heap of gold pieces Road A leads to a small heap of gold pieces Road B leads to a fork: Road B leads to a fork: take the left fork and you’ll be run over by a bus; take the left fork and you’ll be run over by a bus; take the right fork and you’ll find a mound of jewels. take the right fork and you’ll find a mound of jewels. Road A leads to a small heap of gold pieces Road B leads to a fork: guess correctly and you’ll find a mound of jewels; guess incorrectly and you’ll be run over by a bus. Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 19 20 Proper analysis Summary * Intuition that the value of an action is the average of its values Games are fun to work on! (and dangerous) in all actual states is WRONG They illustrate several important points about AI With partial observability, value of an action depends on the ♦ perfection is unattainable ⇒ must approximate information state or belief state the agent is in ♦ good idea to think about what to think about Can generate and search a tree of information states ♦ uncertainty constrains the assignment of values to states Leads to rational behaviors such as Games are a good field to experiment with AI techniques and develop ♦ Acting to obtain information new approaches. ♦ Signalling to one’s partner ♦ Acting randomly to minimize information disclosure Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008 Alan Smaill Fundamentals of Artificial Intelligence Oct 30, 2008

Recommend


More recommend