diff --git a/src/search.cpp b/src/search.cpp index 7317b7e4378..5eb5049a73a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1381,23 +1381,21 @@ Value Search::Worker::search( int bonusScale = (118 * (depth > 5) + 37 * !allNode + 169 * ((ss - 1)->moveCount > 8) + 128 * (!ss->inCheck && bestValue <= ss->staticEval - 102) + 115 * (!(ss - 1)->inCheck && bestValue <= -(ss - 1)->staticEval - 82) - + 80 * ((ss - 1)->isTTMove)); - - // Proportional to "how much damage we have to undo" - bonusScale += std::min(-(ss - 1)->statScore / 106, 318); + + 80 * ((ss - 1)->isTTMove) + std::min(-(ss - 1)->statScore / 106, 318)); bonusScale = std::max(bonusScale, 0); - const int scaledBonus = stat_bonus(depth) * bonusScale / 32; + const int scaledBonus = stat_bonus(depth) * bonusScale; update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, - scaledBonus * 436 / 1024); + scaledBonus * 436 / 32768); - thisThread->mainHistory[~us][((ss - 1)->currentMove).from_to()] << scaledBonus * 207 / 1024; + thisThread->mainHistory[~us][((ss - 1)->currentMove).from_to()] + << scaledBonus * 207 / 32768; if (type_of(pos.piece_on(prevSq)) != PAWN && ((ss - 1)->currentMove).type_of() != PROMOTION) thisThread->pawnHistory[pawn_structure_index(pos)][pos.piece_on(prevSq)][prevSq] - << scaledBonus * 1195 / 1024; + << scaledBonus * 1195 / 32768; } else if (priorCapture && prevSq != SQ_NONE)