I found a bug in stockfish
marco corrected it and replaced
Value rbeta=beta+200 by
Value rbeta = std::min(beta + 200, VALUE_INFINITE);
see the following code:
Code: Select all
if ( !PvNode
&& depth >= 5 * ONE_PLY
&& !ss->skipNullMove
&& abs(beta) < VALUE_MATE_IN_MAX_PLY)
{
Value rbeta = std::min(beta + 200, VALUE_INFINITE); std::min(beta + 200, VALUE_INFINITE);considering the fact that VALUE_MATE_IN_MAX_PLY=29880 when VALUE_INFINITE=30001
I think that a faster code that practically get the same result is the code at the bottom of this post and I wonder what is your opinion.
It seems to me that logical difference can be only in case that abs(beta)>VALUE_INFINITE-200 and these cases practically never happen in games in normal positions and I do not care about little difference in the search in positions when the program already found that one side has a forced mate in some line(and the difference is only for very long mates)
Note also that I checked that the bench is the same in both cases even when I use depth 20 and not the default depth 13 and bench calculate the number of nodes in many positions(note that I practically suspect that it may be better to use less pruning when the score is very high so it is better to use different bounds but it is a functional change that should be tested with normal SPRT).
Code: Select all
if ( !PvNode
&& depth >= 5 * ONE_PLY
&& !ss->skipNullMove
&& abs(beta) <=VALUE_INFINITE-200)
{
Value rbeta = beta + 200;