]> git.sesse.net Git - stockfish/commitdiff
Fix 'improving' condition
authorMarco Costalba <mcostalba@gmail.com>
Fri, 9 Aug 2013 06:21:55 +0000 (08:21 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 9 Aug 2013 06:21:55 +0000 (08:21 +0200)
Because VALUE_NONE is 30002, it happens that
after a check the next move is never an improving
one.

After this patch bench signature is independent from
VALUE_NONE actual value.

bench: 4303194

src/search.cpp

index bba0cb6593c2944cf0dccf2e20a3f43ca1850fa7..9143f6699192ba8ac9899dd6292081e947a67889 100644 (file)
@@ -775,7 +775,10 @@ moves_loop: // When in check and at SpNode search starts from here
     MovePicker mp(pos, ttMove, depth, History, countermoves, ss);
     CheckInfo ci(pos);
     value = bestValue; // Workaround a bogus 'uninitialized' warning under gcc
     MovePicker mp(pos, ttMove, depth, History, countermoves, ss);
     CheckInfo ci(pos);
     value = bestValue; // Workaround a bogus 'uninitialized' warning under gcc
-    improving = ss->staticEval >= (ss-2)->staticEval;
+    improving =   ss->staticEval >= (ss-2)->staticEval
+               || ss->staticEval == VALUE_NONE
+               ||(ss-2)->staticEval == VALUE_NONE;
+
     singularExtensionNode =   !RootNode
                            && !SpNode
                            &&  depth >= (PvNode ? 6 * ONE_PLY : 8 * ONE_PLY)
     singularExtensionNode =   !RootNode
                            && !SpNode
                            &&  depth >= (PvNode ? 6 * ONE_PLY : 8 * ONE_PLY)