0% found this document useful (0 votes)
54 views3 pages

Problemset 2

The document contains a problem set with 4 questions regarding minimax and alpha-beta pruning on a game tree: 1) Write out the minimax solution for the given tree, 2) Which branch should the max player take from the root?, 3) Which branch should the min player take from the root?, 4) List which nodes would be pruned using alpha-beta pruning on the tree.

Uploaded by

Princeton Ferro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views3 pages

Problemset 2

The document contains a problem set with 4 questions regarding minimax and alpha-beta pruning on a game tree: 1) Write out the minimax solution for the given tree, 2) Which branch should the max player take from the root?, 3) Which branch should the min player take from the root?, 4) List which nodes would be pruned using alpha-beta pruning on the tree.

Uploaded by

Princeton Ferro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Problem Set 2

Due: Monday, Sep 27, 2021, 5:10pm


Princeton Ferro ([email protected])

1) Assuming the root player is max, using variables as shown in class, write out the minimax
solution for this tree; e.g. b1 = max(6, −9, 15); b = min(b1 , b2 , b3 ); etc

root = max(b, c, d) = 9

b = min(b1 , b2 , b3 ) = 9
b1 = max(9, 0, −13) = 9
b2 = max(13, −15, 16) = 16
b3 = max(−3, 10, −8) = 10
c = min(c1 , c2 , c3 ) = 4
c1 = max(0, 4, −17) = 4
c2 = max(−12, −2, 11) = 11
c3 = max(18, −14, 2) = 18
d = min(d1 , d2 , d3 ) = −2
d1 = max(−5, −14, −2) = −2
d2 = max(9, −5, 12) = 12
d3 = max(16, −14, 18) = 18
2) Which branch should the max player take from root?

b
3) Which branch should the min player take from root?

root = min(b, c, d) = −12

b = max(b1 , b2 , b3 ) = −8
b1 = min(9, 0, −13) = −13
b2 = min(13, −15, 16) = −15
b3 = min(−3, 10, −8) = −8
c = max(c1 , c2 , c3 ) = −12
c1 = min(0, 4, −17) = −17

c2 = min(−12, −2, 11) = −12


c3 = min(18, −14, 2) = −14
d = max(d1 , d2 , d3 ) = −5
d1 = min(−5, −14, −2) = −14
d2 = min(9, −5, 12) = −5
d3 = min(16, −14, 18) = −14
So min-player should take the branch to c from the root.

4) Assuming the root player is max, using alpha-beta pruning which nodes will be pruned. This
includes nodes partially visited but then pruned. Just a list, order does not matter.

We visit the nodes in DFS order. Nodes pruned have Y in the last column.

Note: minmax is the minimum value that the current maximizing player has seen, while
maxmin is the maximum value that the current minimizing player has seen.
The entries marked with a Y in the last column are pruned.

visiting minmax maxmin behavior pruned?

root −∞ ∞ maximizing

b −∞ ∞ minimizing

b1 −∞ ∞ maximizing

b1,a 9 ∞
b1,b 0 ∞
b1,c −13 ∞
b2 −∞ 9 maximizing

b2,a 13 9
b2,b Y

b2,c Y

b3 −∞ 9 maximizing

b3,a −3 9
b3,b 10 9
b3,c Y

c 9 ∞ minimizing

c1 9 ∞ maximizing

c1,a 0
c1,b 4 ∞
c1,c −17 ∞
c2 9 4 Y

c2,a Y

c2,b Y

c2,c Y

c3 Y

c3,a Y

c3,b Y

c3,c Y

d 9 ∞ minimizing

d1 9 ∞ maximizing

d1,a −5 ∞
d1,b −14 ∞
d1,c −2
d2 9 −2 maximizing Y

d2,a Y

d2,b Y

d2,c Y

d3 Y

d3,a Y

d3,b Y

d3,c Y

You might also like