Skip to content

Commit

Permalink
Adjust bonus to move that caused a fail low
Browse files Browse the repository at this point in the history
This is an elo gainer and simultaneously a minor logical fix to bonuses that caused a fail low.
It increases maximum of statscore based subtraction - but disallows negative bonuses.

Passed STC:
https://tests.stockfishchess.org/tests/view/66955e6f4ff211be9d4ec063
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 44640 W: 11805 L: 11472 D: 21363
Ptnml(0-2): 166, 5178, 11335, 5439, 202

Passed LTC:
https://tests.stockfishchess.org/tests/view/66963fde4ff211be9d4ec190
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 72288 W: 18478 L: 18082 D: 35728
Ptnml(0-2): 50, 7919, 19825, 8285, 65

closes official-stockfish#5494

Bench: 1477054
  • Loading branch information
Vizvezdenec authored and vondele committed Jul 19, 2024
1 parent c283776 commit a8401e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,9 @@ Value Search::Worker::search(
+ 32 * (!(ss - 1)->inCheck && bestValue > -(ss - 1)->staticEval + 76));

// Proportional to "how much damage we have to undo"
bonus += std::clamp(-(ss - 1)->statScore / 100, -64, 300);
bonus += std::clamp(-(ss - 1)->statScore / 100, -94, 300);

bonus = std::max(bonus, 0);

update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
stat_bonus(depth) * bonus / 100);
Expand Down

0 comments on commit a8401e8

Please sign in to comment.