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

Remove simple eval

With the recent introduction of the dual NNUE, the
need for simple eval is no longer there.

Passed STC:
https://tests.stockfishchess.org/tests/view/65c1f735c865510db0281652
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 85312 W: 22009 L: 21837 D: 41466
Ptnml(0-2): 334, 10155, 21567, 10205, 395

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c2d64bc865510db0282810
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 49956 W: 12596 L: 12402 D: 24958
Ptnml(0-2): 28, 5553, 13624, 5743, 30

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

Bench 1213676
This commit is contained in:
cj5716 2024-02-06 16:56:13 +08:00 committed by Disservin
parent f2984471c9
commit c0107b3c27

View file

@ -199,16 +199,7 @@ Value Eval::evaluate(const Position& pos, int optimism) {
assert(!pos.checkers());
int v;
Color stm = pos.side_to_move();
int shuffling = pos.rule50_count();
int simpleEval = simple_eval(pos, stm);
bool lazy = std::abs(simpleEval) > 2550;
if (lazy)
v = simpleEval;
else
{
int simpleEval = simple_eval(pos, pos.side_to_move());
bool smallNet = std::abs(simpleEval) > 1050;
int nnueComplexity;
@ -221,10 +212,10 @@ Value Eval::evaluate(const Position& pos, int optimism) {
nnue -= nnue * (nnueComplexity + std::abs(simpleEval - nnue)) / 32768;
int npm = pos.non_pawn_material() / 64;
v = (nnue * (915 + npm + 9 * pos.count<PAWN>()) + optimism * (154 + npm)) / 1024;
}
int v = (nnue * (915 + npm + 9 * pos.count<PAWN>()) + optimism * (154 + npm)) / 1024;
// Damp down the evaluation linearly when shuffling
int shuffling = pos.rule50_count();
v = v * (200 - shuffling) / 214;
// Guarantee evaluation does not hit the tablebase range