mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Capping stat bonus at 2000
This patch updates the stat_bonus() function (used in the history tables to help move ordering), keeping the same quadratic for small depths but changing the values for depth >= 9: The old bonus formula was increasing from zero at depth 1 to 4100 at depth 14, then used the strange, small value of 73 for all depths >= 15. The new bonus formula increases from 0 at depth 1 to 2000 at depth 8, then keeps 2000 for all depths >= 8. passed STC: LLR: 2.94 (-2.94,2.94) <-0.50,2.50> Total: 169624 W: 42875 L: 42454 D: 84295 Ptnml(0-2): 585, 19340, 44557, 19729, 601 https://tests.stockfishchess.org/tests/view/615bd69e9d256038a969b97c passed LTC: LLR: 3.07 (-2.94,2.94) <0.50,3.50> Total: 37336 W: 9456 L: 9191 D: 18689 Ptnml(0-2): 20, 3810, 10747, 4067, 24 https://tests.stockfishchess.org/tests/view/615c75d99d256038a969b9b2 closes https://github.com/official-stockfish/Stockfish/pull/3731 Bench: 6261865
This commit is contained in:
parent
329bdbd9cf
commit
54a989930e
1 changed files with 3 additions and 3 deletions
|
@ -80,7 +80,7 @@ namespace {
|
||||||
|
|
||||||
// History and stats update bonus, based on depth
|
// History and stats update bonus, based on depth
|
||||||
int stat_bonus(Depth d) {
|
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
|
// Add a small random component to draw evaluations to avoid 3-fold blindness
|
||||||
|
@ -1709,8 +1709,8 @@ moves_loop: // When in check, search starts here
|
||||||
PieceType captured = type_of(pos.piece_on(to_sq(bestMove)));
|
PieceType captured = type_of(pos.piece_on(to_sq(bestMove)));
|
||||||
|
|
||||||
bonus1 = stat_bonus(depth + 1);
|
bonus1 = stat_bonus(depth + 1);
|
||||||
bonus2 = bestValue > beta + PawnValueMg ? bonus1 // larger bonus
|
bonus2 = bestValue > beta + PawnValueMg ? bonus1 // larger bonus
|
||||||
: std::min(bonus1, stat_bonus(depth)); // smaller bonus
|
: stat_bonus(depth); // smaller bonus
|
||||||
|
|
||||||
if (!pos.capture_or_promotion(bestMove))
|
if (!pos.capture_or_promotion(bestMove))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue