Skip to content

Commit fbdf5d9

Browse files
FauziAkramDisservin
authored andcommitted
Tweak quiet move bonus
Improving quiet move bonus by replacing bestvalue and alpha comparison, with checking the statScore of the previous search step instead. Inspired by @locutus2 Passed STC: https://tests.stockfishchess.org/tests/view/657f22fb893104ee25b614e8 LLR: 2.96 (-2.94,2.94) <0.00,2.00> Total: 51296 W: 13121 L: 12774 D: 25401 Ptnml(0-2): 225, 5986, 12868, 6355, 214 Passed LTC: https://tests.stockfishchess.org/tests/view/658024a2893104ee25b62587 LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 82758 W: 20606 L: 20189 D: 41963 Ptnml(0-2): 51, 9149, 22555, 9580, 44 closes official-stockfish#4930 Bench: 1312822
1 parent 358a853 commit fbdf5d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/search.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
748748
// Use static evaluation difference to improve quiet move ordering (~4 Elo)
749749
if (is_ok((ss - 1)->currentMove) && !(ss - 1)->inCheck && !priorCapture)
750750
{
751-
int bonus = std::clamp(-13 * int((ss - 1)->staticEval + ss->staticEval), -1555, 1452);
751+
int bonus = std::clamp(-13 * int((ss - 1)->staticEval + ss->staticEval), -1652, 1546);
752752
thisThread->mainHistory[~us][from_to((ss - 1)->currentMove)] << bonus;
753753
if (type_of(pos.piece_on(prevSq)) != PAWN && type_of((ss - 1)->currentMove) != PROMOTION)
754754
thisThread->pawnHistory[pawn_structure(pos)][pos.piece_on(prevSq)][prevSq] << bonus / 4;
@@ -1344,7 +1344,7 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
13441344
// Bonus for prior countermove that caused the fail low
13451345
else if (!priorCapture && prevSq != SQ_NONE)
13461346
{
1347-
int bonus = (depth > 6) + (PvNode || cutNode) + (bestValue < alpha - 656)
1347+
int bonus = (depth > 6) + (PvNode || cutNode) + ((ss - 1)->statScore < -18782)
13481348
+ ((ss - 1)->moveCount > 10);
13491349
update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
13501350
stat_bonus(depth) * bonus);

0 commit comments

Comments
 (0)