]> git.sesse.net Git - stockfish/commitdiff
Tweak statScore condition
authorGuardianRM <strimr25@mail.ru>
Thu, 21 Sep 2017 06:58:29 +0000 (09:58 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 22 Sep 2017 14:48:08 +0000 (16:48 +0200)
The first change (ss->statScore >= 0) does nothing.

The second change ((ss-1)->statScore >= 0 ) has a massive change.
(ss-1)->statScore is not set until (ss-1) begins to apply LMR to moves.
So we now increase the reduction for bad quiets when our opponent is
running through the first captures and the hash move.

STC
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 57762 W: 10533 L: 10181 D: 37048

LTC
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 19973 W: 2662 L: 2480 D: 14831

Bench: 5037819

src/search.cpp

index eb8aea24a13abc521c07016787e9ea30f3660b15..07c18012739e5b681f662ed08121650d01a9502f 100644 (file)
@@ -979,10 +979,10 @@ moves_loop: // When in check search starts from here
                              - 4000;
 
               // Decrease/increase reduction by comparing opponent's stat score
                              - 4000;
 
               // Decrease/increase reduction by comparing opponent's stat score
-              if (ss->statScore > 0 && (ss-1)->statScore < 0)
+              if (ss->statScore >= 0 && (ss-1)->statScore < 0)
                   r -= ONE_PLY;
 
                   r -= ONE_PLY;
 
-              else if (ss->statScore < 0 && (ss-1)->statScore > 0)
+              else if ((ss-1)->statScore >= 0 && ss->statScore < 0)
                   r += ONE_PLY;
 
               // Decrease/increase reduction for moves with a good/bad history
                   r += ONE_PLY;
 
               // Decrease/increase reduction for moves with a good/bad history