Professional Documents
Culture Documents
Chapter05 4e
Chapter05 4e
Chapter05 4e
Approach
Fourth Edition
Chapter 5
1
Copyright © 2021 Pearson Education, Inc. All Rights Reserved
Outline
♦ Game Theory
♦ Optimal Decisions in Games
– minimax decisions
– α–β pruning
– Monte Carlo Tree Search (MCTS)
♦ Resource limits and approximate
evaluation
♦ Games of chance
♦ Games of imperfect information
♦ Limitations of Game Search Algorithms
Chapter 5 2
Chapter 5 3
Chapter 5 4
Moves: Action
Position: state
Zero sum:
- good for one player, bad for another
- No win-win outcome.
Chapter 5 5
Chapter 5 7
deterministic
chess,
chancecheckers, backgammon
go, othello monopoly
perfect information
battleships, bridge, poker, scrabble
blind tictactoe nuclear war
imperfect information
Chapter 5 8
X X X
MIN (O) X X X
X X X
X O X O X ...
MAX (X) O
X O X X O X O ...
MIN (O) X X
X O X X O X X O X ...
TERMINAL O X O O X X
O X X O X O O
Utility −1 0 +1
Chapter 5 9
Chapter 5 10
Chapter 5 11
Chapter 5 12
Chapter 5 13
Chapter 5 14
Chapter 5 15
Chapter 5 16
Chapter 5
α–β pruning example
MAX 3
MIN 3
3 12 8
Chapter 5 18
MAX 3
MIN 3 2
X X
3 12 8 2
Chapter 5 19
MAX 3
MIN 3 2 14
X X
3 12 8 2 14
Chapter 5 20
MAX 3
MIN 3 2 14 5
X X
3 12 8 2 14 5
Chapter 5 21
MAX 33
MIN 3 2 14 5 2
X X
3 12 8 2 14 2
5
Chapter 5 22
MAX
MIN
..
..
..
MAX
MIN V
α is the best value (to max) found so far off the current
path
If V is worse than α, max will avoid it ⇒ prune that
branch Define β similarly for min
Chapter 5 23
Chapter 5 24
Chapter 5 25
Chapter 5 26
Chapter 5 27
e.g., w1 = 9 with
f 1 (s) = (number of white queens) – (number of black etc.
queens), Chapter 5 28
UCT ranks each possible move based on an upper confidence bound formula UCT
called UCB1
where U(n) is the total utility of all playouts that went through node n, N(n) is the
number of playouts through node n, and PARENT(n) is the parent node of n in the
tree.
Chapter 5 30
Chapter 5 31
Chapter 5 32
Chapter 5 33
0 1 2 3 4 5 6 7 8 9 10 11 12
25 24 23 22 21 20 19 18 17 16 15 14 13
Chapter 5 34
MAX
CHANCE 3 −1
MIN 2 4 0 −2
2 4 7 4 6 0 5
−2
Chapter 5 35
Chapter 5 36
MAX
.9 .1 .9 .1 .9 .1 .9 .1
MIN 2 3 1 4 20 30 1 400
2 2 3 3 1 1 4 4 20 20 30 30 1 1
400 400
Chapter 5 37
Chapter 5 38
Chapter 5 39
Chapter 5 40