X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=09e12ed1bf2602dca0504e94d5a516d65f6cb33d;hb=5ef94eb970bc1e4f95ebc13ec2c31b191ea46f87;hp=50a84d272211ce699f38c968c4331b7474b44b79;hpb=7aa7dfd4dfc275e3b932337ad094e7efbaa90987;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 50a84d27..09e12ed1 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -908,7 +908,8 @@ moves_loop: // When in check search starts from here } // Reduced depth of the next LMR search - int lmrDepth = std::max(newDepth - reduction(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY; + int mch = std::max(1, moveCount - (ss-1)->moveCount / 16); + int lmrDepth = std::max(newDepth - reduction(improving, depth, mch), DEPTH_ZERO) / ONE_PLY; // Countermoves based pruning if ( lmrDepth < 3 @@ -959,7 +960,8 @@ moves_loop: // When in check search starts from here && moveCount > 1 && (!captureOrPromotion || moveCountPruning)) { - Depth r = reduction(improving, depth, moveCount); + int mch = std::max(1, moveCount - (ss-1)->moveCount / 16); + Depth r = reduction(improving, depth, mch); if (captureOrPromotion) r -= r ? ONE_PLY : DEPTH_ZERO; @@ -1246,8 +1248,7 @@ moves_loop: // When in check search starts from here // to search the moves. Because the depth is <= 0 here, only captures, // queen promotions and checks (only if depth >= DEPTH_QS_CHECKS) will // be generated. - const PieceToHistory* contHist[4] = {}; - MovePicker mp(pos, ttMove, depth, &pos.this_thread()->mainHistory, contHist, to_sq((ss-1)->currentMove)); + MovePicker mp(pos, ttMove, depth, &pos.this_thread()->mainHistory, to_sq((ss-1)->currentMove)); // Loop through the moves until no moves remain or a beta cutoff occurs while ((move = mp.next_move()) != MOVE_NONE)