Based on recent simplification by linrock Since it completely removed any
special bonuses based on values difference and made it flat stat_bonus(depth +
1) I got an idea that we might as well remove all (depth + 1) bonuses and make
them usual depth bonuses. Also removes weird negative bonus for depth 1 as a
side effect.
Passed STC:
https://tests.stockfishchess.org/tests/view/
6689d817eca84f4d25863746
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 18080 W: 4789 L: 4552 D: 8739
Ptnml(0-2): 46, 1987, 4727, 2244, 36
Passed LTC:
https://tests.stockfishchess.org/tests/view/
6689daa4eca84f4d258639d7
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 109062 W: 27548 L: 27417 D: 54097
Ptnml(0-2): 58, 11983, 30293, 12164, 33
Passed direct LTC vs linrock patch:
https://tests.stockfishchess.org/tests/view/
668a46f8eca84f4d25866fe9
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 100002 W: 25351 L: 25209 D: 49442
Ptnml(0-2): 54, 11119, 27529, 11229, 70
closes https://github.com/official-stockfish/Stockfish/pull/5461
Bench
1175744
}
// History and stats update bonus, based on depth
-int stat_bonus(Depth d) { return std::clamp(190 * d - 298, 20, 1596); }
+int stat_bonus(Depth d) { return std::min(190 * d - 108, 1596); }
// History and stats update malus, based on depth
int stat_malus(Depth d) { return (d < 4 ? 736 * d - 268 : 2044); }
Piece moved_piece = pos.moved_piece(bestMove);
PieceType captured;
- int quietMoveBonus = stat_bonus(depth + 1);
+ int quietMoveBonus = stat_bonus(depth);
int quietMoveMalus = stat_malus(depth);
if (!pos.capture_stage(bestMove))