]> git.sesse.net Git - stockfish/commitdiff
Simplify nnue eval complexity calculation
authorLinmiao Xu <linmiao.xu@gmail.com>
Sun, 28 May 2023 18:45:24 +0000 (14:45 -0400)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 31 May 2023 06:54:38 +0000 (08:54 +0200)
Remove a multiplier when blending nnue complexity with semi-classical complexity.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/6473a71dd29264e4cfa75839
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 124768 W: 33180 L: 33060 D: 58528
Ptnml(0-2): 314, 13797, 34030, 13941, 302

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/6474af3dd29264e4cfa768f4
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 108180 W: 29008 L: 28884 D: 50288
Ptnml(0-2): 29, 10420, 33075, 10530, 36

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

bench 2316827

src/evaluate.cpp

index 7239fd1eca04d8937d25021f447ece9edfdb316d..40c43d230434a910e9451b926d4f5fba5ae39ca3 100644 (file)
@@ -1071,9 +1071,7 @@ Value Eval::evaluate(const Position& pos) {
       Value nnue = NNUE::evaluate(pos, true, &nnueComplexity);
 
       // Blend nnue complexity with (semi)classical complexity
-      nnueComplexity = (  397 * nnueComplexity
-                        + 477 * abs(psq - nnue)
-                        ) / 1024;
+      nnueComplexity = 25 * (nnueComplexity + abs(psq - nnue)) / 64;
 
       optimism += optimism * nnueComplexity / 256;
       v = (nnue * (945 + npm) + optimism * (174 + npm)) / 1024;