]> git.sesse.net Git - stockfish/commitdiff
Contempt factor: use DrawValue also in case of stealmates
authorMarco Costalba <mcostalba@gmail.com>
Sat, 20 Oct 2012 09:02:37 +0000 (11:02 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 20 Oct 2012 09:02:37 +0000 (11:02 +0200)
Spotted by Jörg Oster.

No functional change (when contempt factor is not used).

src/search.cpp

index e3030490863f4289df4439ce287a4306bc297262..09d272e56983361fe813032c0051adf011169aac 100644 (file)
@@ -1023,7 +1023,8 @@ split_point_start: // At split points actual search starts from here
     // If we are in a singular extension search then return a fail low score.
     // A split node has at least one move, the one tried before to be splitted.
     if (!moveCount)
     // If we are in a singular extension search then return a fail low score.
     // A split node has at least one move, the one tried before to be splitted.
     if (!moveCount)
-        return excludedMove ? alpha : inCheck ? mated_in(ss->ply) : VALUE_DRAW;
+        return  excludedMove ? alpha
+              : inCheck ? mated_in(ss->ply) : DrawValue[pos.side_to_move()];
 
     // If we have pruned all the moves without searching return a fail-low score
     if (bestValue == -VALUE_INFINITE)
 
     // If we have pruned all the moves without searching return a fail-low score
     if (bestValue == -VALUE_INFINITE)