- complexity = (137 * complexity + 137 * abs(nnue - psq)) / 256;
- optimism = optimism * (255 + complexity) / 256;
- v = (nnue * scale + optimism * (scale - 848)) / 1024;
+ Value nnue = NNUE::evaluate(pos, true, &nnueComplexity);
+ // Blend nnue complexity with (semi)classical complexity
+ nnueComplexity = (104 * nnueComplexity + 131 * abs(nnue - psq)) / 256;
+ if (complexity) // Return hybrid NNUE complexity to caller
+ *complexity = nnueComplexity;
+
+ optimism = optimism * (269 + nnueComplexity) / 256;
+ v = (nnue * scale + optimism * (scale - 754)) / 1024;