From: mstembera Date: Mon, 13 Feb 2023 01:33:19 +0000 (-0800) Subject: Simplify nnueComplexity calculation. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=29c1e072b669c2257e4b48094391e7dc39fb31a5 Simplify nnueComplexity calculation. 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 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 6d5a8a0c..080d412b 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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