]> git.sesse.net Git - stockfish/commitdiff
Full bonus for LMR stats update
authorStefan Geschwentner <stgeschwentner@gmail.com>
Fri, 12 Jul 2019 08:17:24 +0000 (10:17 +0200)
committerStéphane Nicolet <cassio@free.fr>
Sat, 13 Jul 2019 03:49:14 +0000 (05:49 +0200)
Simplify previous commit by using the full bonus for LMR-triggered stats update.

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 23684 W: 5255 L: 5137 D: 13292
http://tests.stockfishchess.org/tests/view/5d2826660ebc5925cf0d5180

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 16245 W: 2832 L: 2704 D: 10709
http://tests.stockfishchess.org/tests/view/5d282e9c0ebc5925cf0d529b

Closes https://github.com/official-stockfish/Stockfish/pull/2236

Bench: 3361902

src/search.cpp

index ea0c64f1ea01c610e3a11b7744a5e282589fb5f6..bd5ae75e0582145276a7f6d3f7681d7bf3e8d02f 100644 (file)
@@ -1134,9 +1134,8 @@ moves_loop: // When in check, search starts from here
 
           if (doLMR && !captureOrPromotion)
           {
-              int bonus = stat_bonus(newDepth) / 2;
-              if (value <= alpha)
-                  bonus = -bonus;
+              int bonus = value > alpha ?  stat_bonus(newDepth)
+                                        : -stat_bonus(newDepth);
 
               update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
           }