]> git.sesse.net Git - stockfish/commitdiff
Less reduction for escape moves at ttPv nodes
authorStefan Geschwentner <stgeschwentner@gmail.com>
Tue, 21 Jan 2020 08:28:58 +0000 (09:28 +0100)
committerStéphane Nicolet <cassio@free.fr>
Thu, 23 Jan 2020 17:53:50 +0000 (18:53 +0100)
At expected PV nodes or nodes which marked as PV node in the hash table,
reduce escape moves even one ply less.

STC:
LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 31795 W: 6140 L: 5953 D: 19702
Ptnml(0-2): 525, 3625, 7455, 3695, 583
http://tests.stockfishchess.org/tests/view/5e25d77fc3b97aa0d75bc013

LTC:
LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 43975 W: 5708 L: 5454 D: 32813
Ptnml(0-2): 314, 4012, 13070, 4242, 325
http://tests.stockfishchess.org/tests/view/5e2618c1c3b97aa0d75bc03c

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

Bench: 4475583

src/search.cpp

index 21df156c7ce979d040049234e1d5c1bca1bf665d..3bd1a92d7fc2c9106b6ae2df89901dee25fc5d9c 100644 (file)
@@ -625,7 +625,7 @@ namespace {
     Move ttMove, move, excludedMove, bestMove;
     Depth extension, newDepth;
     Value bestValue, value, ttValue, eval, maxValue;
-    bool ttHit, ttPv, inCheck, givesCheck, improving , didLMR, priorCapture;
+    bool ttHit, ttPv, inCheck, givesCheck, improving, didLMR, priorCapture;
     bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture, singularLMR;
     Piece movedPiece;
     int moveCount, captureCount, quietCount;
@@ -825,7 +825,6 @@ namespace {
         &&  eval <= alpha - RazorMargin)
         return qsearch<NT>(pos, ss, alpha, beta);
 
-    // (~13 Elo)
     improving =  (ss-2)->staticEval == VALUE_NONE ? (ss->staticEval > (ss-4)->staticEval
               || (ss-4)->staticEval == VALUE_NONE) : ss->staticEval > (ss-2)->staticEval;
 
@@ -1161,7 +1160,7 @@ moves_loop: // When in check, search starts from here
               // hence break make_move(). (~2 Elo)
               else if (    type_of(move) == NORMAL
                        && !pos.see_ge(reverse_move(move)))
-                  r -= 2;
+                  r -= 2 + ttPv;
 
               ss->statScore =  thisThread->mainHistory[us][from_to(move)]
                              + (*contHist[0])[movedPiece][to_sq(move)]