If we get a TT hit, we typically only re-use the TT score and exit early in three conditions:
1) TT flag is exact,
2) TT flag == fail-low, and TT score is <= current alpha, or
3) TT flag == fail-high, and TT score is >= current beta.
In my engine Calvin it looks like this:
Code: Select all
return entry.getDepth() >= depth &&
((entry.getFlag().equals(HashFlag.EXACT)) ||
(entry.getFlag().equals(HashFlag.UPPER) && entry.getScore() <= alpha) ||
(entry.getFlag().equals(HashFlag.LOWER) && entry.getScore() >= beta));
For example, say I come across a position that was previously searched to a shallower depth, but that has a score 500 cp lower than my current alpha, or 500 cp higher than my current beta. Is it not a reasonable gamble to assume that there's little point searching any further, and cutting off early?
I'm wondering if other folks have already tried this idea before, and if so, what kind of results did you see?
Thanks!