summaryrefslogtreecommitdiffstats
path: root/src/test_cases/q2/2-2a-vary-depth.test
blob: 204877fa4fc38755883dd5e1f25e1ea5f15c52a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class: "GraphGameTreeTest"
alg: "MinimaxAgent"
depth: "1"

diagram: """
            /-----a------\
           /              \
          /                \
        b1                  b2
      /    \                 |
-4 c1        c2 9           cx -3.99
  /  \      /  \             |
 d1   d2  d3   d4           dx
-3    -9  10    6         -3.99

a - max
b - min
c - max

Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
The values next to c1, c2, and cx are the values of the evaluation function, not
necessarily the correct minimax backup.
"""
num_agents: "2"

start_state: "a"
win_states: "d1 d2 d3 d4 dx"
lose_states: ""

successors: """
a Left b1
a Right b2
b1 Left c1
b1 Right c2
b2 Down cx
c1 Left d1
c1 Right d2
c2 Left d3
c2 Right d4
cx Down dx
"""

evaluation: """
c1 -4.0
c2 9.0
cx -3.99
d1 -3.0
d2 -9.0
d3 10.0
d4 6.0
dx -3.99
"""