]> git.sesse.net Git - stockfish/commitdiff
Simplify blending nnue complexity with optimism
authorLinmiao Xu <linmiao.xu@gmail.com>
Thu, 1 Jun 2023 13:50:19 +0000 (09:50 -0400)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sun, 4 Jun 2023 20:56:44 +0000 (22:56 +0200)
Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/6478a26d54dd118e1d98f21c
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 241248 W: 64058 L: 64063 D: 113127
Ptnml(0-2): 644, 26679, 65960, 26720, 621

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/647b464854dd118e1d9928b2
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 24336 W: 6658 L: 6451 D: 11227
Ptnml(0-2): 8, 2316, 7312, 2525, 7

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

bench 2425813

src/evaluate.cpp

index 40c43d230434a910e9451b926d4f5fba5ae39ca3..bf6dd69a950282588c904d5f60b0305f9eb9b319 100644 (file)
@@ -1070,10 +1070,8 @@ Value Eval::evaluate(const Position& pos) {
 
       Value nnue = NNUE::evaluate(pos, true, &nnueComplexity);
 
-      // Blend nnue complexity with (semi)classical complexity
-      nnueComplexity = 25 * (nnueComplexity + abs(psq - nnue)) / 64;
-
-      optimism += optimism * nnueComplexity / 256;
+      // Blend optimism with nnue complexity and (semi)classical complexity
+      optimism += 25 * optimism * (nnueComplexity + abs(psq - nnue)) / 16384;
       v = (nnue * (945 + npm) + optimism * (174 + npm)) / 1024;
   }