X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=ac6b8608848afdf17aecd894236fbf79fc5d03d7;hb=f21a66f70dce4e9d72031a13d25ac530bbafc830;hp=df4af54a5eebb54308ce6d849f461f4feacf47da;hpb=371b522e9ed9cab91274ff111c0bf4b0f6ec3340;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index df4af54a..ac6b8608 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -80,7 +80,7 @@ namespace { // History and stats update bonus, based on depth int stat_bonus(Depth d) { - return d > 14 ? 73 : 6 * d * d + 229 * d - 215; + return std::min((6 * d + 229) * d - 215 , 2000); } // Add a small random component to draw evaluations to avoid 3-fold blindness @@ -790,7 +790,6 @@ namespace { else { // In case of null move search use previous static eval with a different sign - // and addition of two tempos if ((ss-1)->currentMove != MOVE_NULL) ss->staticEval = eval = evaluate(pos); else @@ -1187,6 +1186,7 @@ moves_loop: // When in check, search starts here { Depth r = reduction(improving, depth, moveCount, rangeReduction > 2); + // Decrease reduction if on the PV (~1 Elo) if (PvNode) r--; @@ -1499,7 +1499,6 @@ moves_loop: // When in check, search starts here } else // In case of null move search use previous static eval with a different sign - // and addition of two tempos ss->staticEval = bestValue = (ss-1)->currentMove != MOVE_NULL ? evaluate(pos) : -(ss-1)->staticEval; @@ -1709,8 +1708,8 @@ moves_loop: // When in check, search starts here PieceType captured = type_of(pos.piece_on(to_sq(bestMove))); bonus1 = stat_bonus(depth + 1); - bonus2 = bestValue > beta + PawnValueMg ? bonus1 // larger bonus - : std::min(bonus1, stat_bonus(depth)); // smaller bonus + bonus2 = bestValue > beta + PawnValueMg ? bonus1 // larger bonus + : stat_bonus(depth); // smaller bonus if (!pos.capture_or_promotion(bestMove)) {