2

I have trouble understanding null move pruning. I understand the concept of a free move for the side that just played a move, but what I don't understand is the code part:

int score = -negamax(-beta,-beta+1,depht-1-R)

Why do we pass in for the second parameter -beta + 1, why not -alpha?

1
  • This is simply using the concept of null windows, whose name is unrelated by the way. We replace the alpha since for null-move pruning, we don't need to know the exact value of the resulting search, just whether or not it failed high for us (-beta) or not (-beta+1). Replacing alpha restricts the bounds of the search and thus saves us time by pruning branches that are irrelevant to whether or not the search will fail high or low. Commented Jan 9 at 1:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.