]> git.sesse.net Git - stockfish/commitdiff
Simplify smallnet threshold
authorGahtan Nahdi <155860115+gahtan-syarif@users.noreply.github.com>
Sat, 1 Jun 2024 22:26:34 +0000 (05:26 +0700)
committerDisservin <disservin.social@gmail.com>
Mon, 3 Jun 2024 21:18:36 +0000 (23:18 +0200)
Turns the quadratic threshold to a linear one

STC non-reg:
https://tests.stockfishchess.org/tests/view/665ba0b744e8416a9cdc188d
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 330432 W: 85351 L: 85454 D: 159627
Ptnml(0-2): 888, 39643, 84283, 39488, 914

LTC non-reg:
https://tests.stockfishchess.org/tests/view/665cd60ffd45fb0f907c4306
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 139146 W: 35194 L: 35093 D: 68859
Ptnml(0-2): 58, 15523, 38313, 15618, 61

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

Bench: 1057383

src/evaluate.cpp

index eaf7ab5f981edab4bad2930708724757c6826b1a..064ea027baa8f63e076d72d84456b9cff787978c 100644 (file)
@@ -46,8 +46,7 @@ int Eval::simple_eval(const Position& pos, Color c) {
 
 bool Eval::use_smallnet(const Position& pos) {
     int simpleEval = simple_eval(pos, pos.side_to_move());
-    int pawnCount  = pos.count<PAWN>();
-    return std::abs(simpleEval) > 992 + 6 * pawnCount * pawnCount / 16;
+    return std::abs(simpleEval) > 992 + 10 * pos.count<PAWN>();
 }
 
 // Evaluate is the evaluator for the outer world. It returns a static evaluation