1
CS 331: Artificial Intelligence Adversarial Search II
1
Outline
- 1. Evaluation Functions
2 2 pla er ero s m finite stochastic games
- 2. 2 player zero-sum finite stochastic games
- f perfect information
- 3. State-of-the-art game playing programs
2
CS 331: Artificial Intelligence Adversarial Search II 1 Outline - - PDF document
CS 331: Artificial Intelligence Adversarial Search II 1 Outline 1. Evaluation Functions 2 2. 2 player zero-sum finite stochastic games 2 pla er ero s m finite stochastic games of perfect information 3. State-of-the-art game playing programs
1
2
3
4
5
T Cutoff
X O O X X
Eval=+100 (for win)
O X X O X O
Eval=-100 (for loss)
X O
6
O X X O
Eval=2 X’s move
X O O X
X’s move Eval=1
7
8
Even in a deterministic game like chess, the evaluation function introduces uncertainty because of the lack of computational resources (can’t see all the way to the terminal state so you have to make a guess as to how good your state is).
9
n
n i i i n n
1 2 2 1 1
11
12
13
14
15
16
17
18
19
20
21
22
23
Value Prob 1 2 3 Value Prob 1 0.5 2 3 Value Prob 1 0.1 2 0.1 3 0.2 OR OR
24
4 5 6 1 4 5 6 0.5 4 0.2 5 0.3 6 0.1
Value Prob 1 0.1
Expected Value (0 1)(1)+(0 1)(2)+(0 2)(3)+(0 2)(4)+(0 3)(5)+(0 1)(6)
25
2 0.1 3 0.2 4 0.2 5 0.3 6 0.1
= (0.1)(1)+(0.1)(2)+(0.2)(3)+(0.2)(4)+(0.3)(5)+(0.1)(6) = 0.1 + 0.2 + 0.6 + 0.8 + 1.5 + 0.6 = 3.8
A MAX B Chance Chance p=0.1
p=0.9 +10
p=0.5 p=0.5 MIN
26
+10 p
chance nodes
minimax value
A MAX B Chance Chance p=0.1
p=0.9 +10
p=0.5 p=0.5
(0.5)(10)+(0.5)(-12)=
MIN
27
+10 p
A
(0 1)( 50)+(0 9)(10) 4
MAX B Chance Chance p=0.1
p=0.9 +10
p=0.5 p=0.5
(0.1)(-50)+(0.9)(10)=4 (0.5)(10)+(0.5)(-12)=
MIN
28
+10 p
A
(0 1)( 50)+(0 9)(10) 4 4
MAX B Chance Chance p=0.1
p=0.9 +10
p=0.5 p=0.5
(0.1)(-50)+(0.9)(10)=4 (0.5)(10)+(0.5)(-12)=
MIN
29
+10 p
If n is a terminal state
) ( Successors s
n
) ( Successors s
n
(n) Successors s
If n is a MAX node If n is a terminal state If n is a chance node If n is a MIN node
30 ( )
a1 a2 a1 a2 Max 2 3 2.1 1 4 1.3 20 30 21 1 400 40.9 0.9 0.1 0.9 0.1 0.9 0.1 0.9 0.1 Chance Min
31
2 2 3 3 1 1 4 4 20 20 30 30 1 1 400 400
Eval function: [1,2,3,4] on leaves Eval function: [1,20,30,400] on leaves
a1 a2 a1 a2 Max 2 3 2.1 1 4 1.3 20 30 21 1 400 40.9 0.9 0.1 0.9 0.1 0.9 0.1 0.9 0.1 Chance Min 2 2 3 3 1 1 4 4 20 20 30 30 1 1 400 400
Order of evaluation values remains the same but their scale differs. This changes the behavior of the program! To preserve the behavior, you need to do a positive linear transformation on the expected utilities of a position.
N = # of possibilities at a chance node (assuming all chance nodes have the same number of possibilities)
33
34
35
36
37
38
U d i f b 4000 i i
39
5 pieces, many with 6 pieces remaining)
40
41