]> git.sesse.net Git - stockfish/commitdiff
Document Elo impact of the LMR part of search
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 18 Apr 2018 17:17:16 +0000 (19:17 +0200)
committerStéphane Nicolet <cassio@free.fr>
Wed, 18 Apr 2018 17:17:37 +0000 (19:17 +0200)
Similar to before, document Elo impact of various LMR steps

Tests run by @jerrydonaldwatson

t1 http://tests.stockfishchess.org/tests/view/5abece950ebc591a560aad0b
t2 http://tests.stockfishchess.org/tests/view/5abecf0c0ebc591a560aad0d
t3 http://tests.stockfishchess.org/tests/view/5abecf7b0ebc591a560aad0f
t4 http://tests.stockfishchess.org/tests/view/5abecfe70ebc591a560aad14
t5 http://tests.stockfishchess.org/tests/view/5abed42b0ebc591a560aad33
t6 http://tests.stockfishchess.org/tests/view/5abed0b90ebc591a560aad19
t7 http://tests.stockfishchess.org/tests/view/5abed1240ebc591a560aad1b
t8 http://tests.stockfishchess.org/tests/view/5abed1b90ebc591a560aad1d

No functional change.

src/search.cpp

index 25383aae9d2504801f05e8e82aff4245d3990f61..b61a21ad39018fa251ca743200194fdfdbd65ebe 100644 (file)
@@ -978,29 +978,29 @@ moves_loop: // When in check, search starts from here
       {
           Depth r = reduction<PvNode>(improving, depth, moveCount);
 
       {
           Depth r = reduction<PvNode>(improving, depth, moveCount);
 
-          if (captureOrPromotion)
+          if (captureOrPromotion) // (~5 Elo)
               r -= r ? ONE_PLY : DEPTH_ZERO;
           else
           {
               r -= r ? ONE_PLY : DEPTH_ZERO;
           else
           {
-              // Decrease reduction if opponent's move count is high
+              // Decrease reduction if opponent's move count is high (~5 Elo)
               if ((ss-1)->moveCount > 15)
                   r -= ONE_PLY;
 
               if ((ss-1)->moveCount > 15)
                   r -= ONE_PLY;
 
-              // Decrease reduction for exact PV nodes
+              // Decrease reduction for exact PV nodes (~0 Elo)
               if (pvExact)
                   r -= ONE_PLY;
 
               if (pvExact)
                   r -= ONE_PLY;
 
-              // Increase reduction if ttMove is a capture
+              // Increase reduction if ttMove is a capture (~0 Elo)
               if (ttCapture)
                   r += ONE_PLY;
 
               if (ttCapture)
                   r += ONE_PLY;
 
-              // Increase reduction for cut nodes
+              // Increase reduction for cut nodes (~5 Elo)
               if (cutNode)
                   r += 2 * ONE_PLY;
 
               // Decrease reduction for moves that escape a capture. Filter out
               // castling moves, because they are coded as "king captures rook" and
               if (cutNode)
                   r += 2 * ONE_PLY;
 
               // Decrease reduction for moves that escape a capture. Filter out
               // castling moves, because they are coded as "king captures rook" and
-              // hence break make_move().
+              // hence break make_move(). (~5 Elo)
               else if (    type_of(move) == NORMAL
                        && !pos.see_ge(make_move(to_sq(move), from_sq(move))))
                   r -= 2 * ONE_PLY;
               else if (    type_of(move) == NORMAL
                        && !pos.see_ge(make_move(to_sq(move), from_sq(move))))
                   r -= 2 * ONE_PLY;
@@ -1011,14 +1011,14 @@ moves_loop: // When in check, search starts from here
                              + (*contHist[3])[movedPiece][to_sq(move)]
                              - 4000;
 
                              + (*contHist[3])[movedPiece][to_sq(move)]
                              - 4000;
 
-              // Decrease/increase reduction by comparing opponent's stat score
+              // Decrease/increase reduction by comparing opponent's stat score (~10 Elo)
               if (ss->statScore >= 0 && (ss-1)->statScore < 0)
                   r -= ONE_PLY;
 
               else if ((ss-1)->statScore >= 0 && ss->statScore < 0)
                   r += ONE_PLY;
 
               if (ss->statScore >= 0 && (ss-1)->statScore < 0)
                   r -= ONE_PLY;
 
               else if ((ss-1)->statScore >= 0 && ss->statScore < 0)
                   r += ONE_PLY;
 
-              // Decrease/increase reduction for moves with a good/bad history
+              // Decrease/increase reduction for moves with a good/bad history (~30 Elo)
               r = std::max(DEPTH_ZERO, (r / ONE_PLY - ss->statScore / 20000) * ONE_PLY);
           }
 
               r = std::max(DEPTH_ZERO, (r / ONE_PLY - ss->statScore / 20000) * ONE_PLY);
           }