X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=1a8cf662c6f46caa494a27bfaf84f8d24362b86f;hp=34ebe6c3febbac4ac02771bdeef28424a2245fad;hb=027626db1e449597ba2211a0819f251beda37b88;hpb=f9595828eb7e5e970b0be3ee5f84ddd726845523;ds=inline diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 34ebe6c3..1a8cf662 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1025,7 +1025,7 @@ Value Eval::evaluate(const Position& pos) { { // Scale and shift NNUE for compatibility with search and classical evaluation auto adjusted_NNUE = [&](){ - int mat = pos.non_pawn_material() + PieceValue[MG][PAWN] * pos.count(); + int mat = pos.non_pawn_material() + PawnValueMg * pos.count(); return NNUE::evaluate(pos) * (720 + mat / 32) / 1024 + Tempo; }; @@ -1041,10 +1041,10 @@ Value Eval::evaluate(const Position& pos) { // For the case of opposite colored bishops, switch to NNUE eval with // small probability if the classical eval is less than the threshold. if ( largePsq - && (abs(v) * 16 < NNUEThreshold2 * r50 - || ( pos.opposite_bishops() - && abs(v) * 16 < (NNUEThreshold1 + pos.non_pawn_material() / 64) * r50 - && !(pos.this_thread()->nodes & 0xB)))) + && ( abs(v) * 16 < NNUEThreshold2 * r50 + || ( pos.opposite_bishops() + && abs(v) * 16 < (NNUEThreshold1 + pos.non_pawn_material() / 64) * r50 + && !(pos.this_thread()->nodes & 0xB)))) v = adjusted_NNUE(); }