I don't have time to read the PDF. But here is a synopsis of what works:Colin wrote:Sorry, but they are different...
On pages 14 and 15 is the pseudocode.
http://homepages.cwi.nl/~paulk/theses/Carolus.pdf
LOWERBOUND is associated with ALPHA,
UPPERBOUND is associated with BETA
(In both the testing flag, and storing parts)
On page 15 here
http://www.cs.ualberta.ca/~tony/OldPape ... review.pdf,
LBOUND is associated with ALPHA for testing flag, and BETA for Storing.
UBOUND is associated with BETA for testing flag, and ALPHA for Storing.
Regardless of the what you call them.. I think it is back to front on the 2nd pdf above, and can be resolved by switching them round in the Storing part.
Does this sound right?
1. You are searching and complete a ply after searching all nodes, and the best score is limited as alpha < score < beta, so you have a good score. You store that score, and EXACT.
2. You are searching and you find a score >= beta at the current ply. You store LOWER + beta, because beta is now a lower bound. You know the score is >= beta but you don't know how much so beta represents the lower bound on the unknown score.
3. You are searching and you complete all nodes and best score is still <= alpha. You store UPPER + alpha. You know the score is <= alpha but you don't know how much so alpha represents the upper bound on the unknown score.
Now you are searching along and you get a hit.
1. if type = EXACT (all of this assumes the draft is sufficient) you just return the score you retrieved and use that with no more searching at this ply.
2. if type = LOWER, you make sure your current beta bound is greater than or equal to the bound score in the table, which means you are in a position where if you know that the score is >= x, and x is >= your beta value, it will cause a fail high and you can stop searching.
3. if type = UPPER, you make sure your current alpha bound is less than or equal to the bound score in the table, which means you are in a position where you know the score is <= x, and x is <= your alpha value, it will cause a fail low and you can stop searching.
It really is that easy. Only the mate scores and bounds need special adjustments...