I am having trouble understanding why the alpha-beta pruning algorithm should not prune C here?
Here is my terminal output:
eval A
min 2 min1 -9223372036854775807 10.0
eval B
min 2 min2 10.0 10.0
*** FAIL: test_cases/q3/6-tied-root.test
*** Incorrect generated nodes for depth=3
*** Student generated nodes: A B max min1 min2
*** Correct generated nodes: A B C max min1 min2
*** Tree:
*** max
*** / \
*** min1 min2
*** | / \
*** A B C
*** 10 10 0
My understanding was that once B is evaluated, min2 will see that max will not pick anything lower than 10, therefore, even if a smaller value is found (x<=10) it would not make a difference. In this case, min2 would only be incentivized to look at C if B was greater than 10.
Thanks in advance
My understanding was that once B is evaluated, min2 will see that max will not pick anything lower than 10, therefore, even if a smaller value is found (x<=10) it would not make a difference.
It's correct and can be verified with an online simulator (e.g. http://homepage.ufp.pt/jtorres/ensino/ia/alfabeta.html or https://raphsilva.github.io/utilities/minimax_simulator/):
min2 would only be incentivized to look at C if B was greater than 10.
Equally correct:
min2 must check C
also if A is less than 10
.
Could it be a wrong test case?