constexpr Value LazyThreshold1 = Value(1400);
constexpr Value LazyThreshold2 = Value(1300);
constexpr Value SpaceThreshold = Value(12222);
- constexpr Value NNUEThreshold = Value(520);
+ constexpr Value NNUEThreshold = Value(460);
// KingAttackWeights[PieceType] contains king attack weights by piece type
constexpr int KingAttackWeights[PIECE_TYPE_NB] = { 0, 0, 81, 52, 44, 10 };
{
Value v = eg_value(pos.psq_score());
// Take NNUE eval only on balanced positions
- if (abs(v) < NNUEThreshold)
+ if (abs(v) < NNUEThreshold + 20 * pos.count<PAWN>())
return NNUE::evaluate(pos) + Tempo;
}
return Evaluation<NO_TRACE>(pos).value();