]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Improve play for closed positions
[stockfish] / src / evaluate.cpp
index 76266937d56717fe047789b49857cd7f199ae350..6bd3c08b5133a672bab8616c57108a0a6704bd70 100644 (file)
@@ -1052,8 +1052,8 @@ Value Eval::evaluate(const Position& pos) {
   {
       // Scale and shift NNUE for compatibility with search and classical evaluation
       auto  adjusted_NNUE = [&](){
   {
       // Scale and shift NNUE for compatibility with search and classical evaluation
       auto  adjusted_NNUE = [&](){
-         int mat = pos.non_pawn_material() + PawnValueMg * pos.count<PAWN>();
-         return NNUE::evaluate(pos) * (679 + mat / 32) / 1024 + Tempo;
+         int mat = pos.non_pawn_material() + 2 * PawnValueMg * pos.count<PAWN>();
+         return NNUE::evaluate(pos) * (641 + mat / 32 - 4 * pos.rule50_count()) / 1024 + Tempo;
       };
 
       // If there is PSQ imbalance use classical eval, with small probability if it is small
       };
 
       // If there is PSQ imbalance use classical eval, with small probability if it is small