mcostalba wrote:bob wrote:
If that isn't clear, let me know and I will do a more formal explanation.
Could you please do a more formal explanation ? I got the idea but I think I still miss the details.
Thanks in advance
Marco
Sure. First the code from hash.c:
at the top of HashProbe():
avoid_null = 0;
In hash probe after I have matched the signature to prove this is the correct entry:
if ((type & UPPER) && depth - null_depth - 1 <= draft && val < beta)
avoid_null = 1;
Explanation:
type = 0 Entry is "worthless"
type = 1 Entry is LOWER, that is, the search that produced this entry failed high, which means the bound given in the entry is a lower bound for the true result and it might be higher (this table bound was the "beta" value when the search failed high, so we know the score is >= this beta value, but we do not know how much better it might be).
type = 2 Entry is UPPER, that is, the search that produced this entry failed low, which means the bound given in the entry is an upper bound for the true result, which might be even lower than this bound (this is the value of alpha where the searched failed low).
type = 3 Entry is EXACT, which means this is a true score.
type & UPPER will be true if this is an EXACT score or UPPER bound.
The normal null search is to depth - null-depth - 1, so I compare this value to the draft to make sure that the draft is at least this deep, or better, or I can't make this test work.
val < beta simply asks "Is the table value < beta" which is another way of asking "If I search to depth - null-depth -1, is the resulting value going to be < beta? If so, the null-search will not fail high and there is no point in doing it.
If I exit the HashProbe() function without being able to return a "show-stopper" type result (a result that will terminate the search with no further effort required) I then return the "avoid_null_ value above rather than "0" where the 0 says "no useful hash information found..."
If avoid_null == 1, then I skip the null-move search completely, no matter what else might be done.
For Don:
Got the cluster test running. WIll report some 40K game results this evening to compare Crafty with and without this feature. I suspect it will be small, but measurable with 40K games.