]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Do stats updates after LMR for captures
[stockfish] / src / search.cpp
index c3360ad14d49c05b06a28477d5d6357f247d4305..8d5ad97975d6e22827a0576173b626759936d0b0 100644 (file)
@@ -1194,11 +1194,14 @@ moves_loop: // When in check, search starts here
           value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode);
 
           // If the move passed LMR update its stats
-          if (didLMR && !captureOrPromotion)
+          if (didLMR)
           {
               int bonus = value > alpha ?  stat_bonus(newDepth)
                                         : -stat_bonus(newDepth);
 
+              if (captureOrPromotion)
+                  bonus /= 4;
+
               update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
           }
       }