mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Simplify 50 move rule dampening
Refactor the logic of 50 move rule dampening by removing a constant. Passed non-regression STC: LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 35232 W: 9214 L: 8992 D: 17026 Ptnml(0-2): 114, 4081, 8999, 4313, 109 https://tests.stockfishchess.org/tests/view/665a329013d08af3c1725610 Passed non-regression LTC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 38406 W: 9732 L: 9530 D: 19144 Ptnml(0-2): 14, 4132, 10708, 4336, 13 https://tests.stockfishchess.org/tests/view/665a370913d08af3c1725651 https://github.com/official-stockfish/Stockfish/pull/5327 Bench: 1059739
This commit is contained in:
parent
ec1cda1d81
commit
180cab4438
1 changed files with 2 additions and 2 deletions
|
@ -81,10 +81,10 @@ Value Eval::evaluate(const Eval::NNUE::Networks& networks,
|
|||
int material = 300 * pos.count<PAWN>() + 350 * pos.count<KNIGHT>() + 400 * pos.count<BISHOP>()
|
||||
+ 640 * pos.count<ROOK>() + 1200 * pos.count<QUEEN>();
|
||||
|
||||
v = (nnue * (34300 + material) + optimism * (4400 + material)) / 35967;
|
||||
v = (nnue * (34300 + material) + optimism * (4400 + material)) / 36672;
|
||||
|
||||
// Damp down the evaluation linearly when shuffling
|
||||
v = v * (204 - pos.rule50_count()) / 208;
|
||||
v -= v * pos.rule50_count() / 212;
|
||||
|
||||
// Guarantee evaluation does not hit the tablebase range
|
||||
v = std::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue