1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Remove material imbalance from nnue eval

Passed non-reg STC:
https://tests.stockfishchess.org/tests/view/65fdf11f0ec64f0526c52b57
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 76480 W: 19893 L: 19712 D: 36875
Ptnml(0-2): 339, 9107, 19157, 9308, 329

Passed non-reg LTC:
https://tests.stockfishchess.org/tests/view/65fee22e0ec64f0526c53885
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 150948 W: 38078 L: 37988 D: 74882
Ptnml(0-2): 111, 16997, 41148, 17127, 91

closes https://github.com/official-stockfish/Stockfish/pull/5135

Bench: 2103324
This commit is contained in:
Gahtan Nahdi 2024-03-23 03:48:44 +07:00 committed by Disservin
parent d49b3738bc
commit ed24e3a0a6

View file

@ -63,7 +63,7 @@ Value Eval::evaluate(const Eval::NNUE::Networks& networks, const Position& pos,
int shufflingDiv) { int shufflingDiv) {
// Blend optimism and eval with nnue complexity and material imbalance // Blend optimism and eval with nnue complexity and material imbalance
optimism += optimism * (nnueComplexity + std::abs(simpleEval - nnue)) / optDiv; optimism += optimism * (nnueComplexity + std::abs(simpleEval - nnue)) / optDiv;
nnue -= nnue * (nnueComplexity + std::abs(simpleEval - nnue)) / nnueDiv; nnue -= nnue * (nnueComplexity * 5 / 3) / nnueDiv;
int npm = pos.non_pawn_material() / 64; int npm = pos.non_pawn_material() / 64;
v = (nnue * (npm + pawnCountConstant + pawnCountMul * pos.count<PAWN>()) v = (nnue * (npm + pawnCountConstant + pawnCountMul * pos.count<PAWN>())