+ Value nnue = NNUE::evaluate(pos, true); // NNUE
+ int scale = 1036 + 22 * pos.non_pawn_material() / 1024;
+ Color stm = pos.side_to_move();
+ Value optimism = pos.this_thread()->optimism[stm];
+ Value psq = (stm == WHITE ? 1 : -1) * eg_value(pos.psq_score());
+ int complexity = 35 * abs(nnue - psq) / 256;