]> git.sesse.net Git - stockfish/commitdiff
Simplify nnueComplexity calculation.
authormstembera <MissingEmail@email>
Mon, 13 Feb 2023 01:33:19 +0000 (17:33 -0800)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 18 Feb 2023 12:30:48 +0000 (13:30 +0100)
further simplification after https://github.com/official-stockfish/Stockfish/pull/4377

STC https://tests.stockfishchess.org/tests/view/63e02a3773223e7f52ad8190
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 359072 W: 94605 L: 94733 D: 169734
Ptnml(0-2): 994, 39874, 97958, 39686, 1024

LTC https://tests.stockfishchess.org/tests/view/63e3fd12b5f425d71f77002a
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 248424 W: 66020 L: 66030 D: 116374
Ptnml(0-2): 113, 24653, 74689, 24645, 112

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

bench: 4098325

src/evaluate.cpp

index 6d5a8a0ce158ad5ab0b55b04bef349b9024832b7..080d412b7d968838c20bf803816834202fcca831 100644 (file)
@@ -1072,8 +1072,7 @@ Value Eval::evaluate(const Position& pos, int* complexity) {
 
       // Blend nnue complexity with (semi)classical complexity
       nnueComplexity = (  406 * nnueComplexity
-                        + 424 * abs(psq - nnue)
-                        + int(optimism) * int(psq - nnue)
+                        + (424 + optimism) * abs(psq - nnue)
                         ) / 1024;
 
       // Return hybrid NNUE complexity to caller