From f40913f7f699d9d875e44929608b45947421ad03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ste=CC=81phane=20Nicolet?= Date: Sun, 4 Apr 2021 10:51:45 +0200 Subject: [PATCH] Keep more pawns This patch increases the weight of pawns in the scale factor applied to the output of the NNUE evaluation. This has the effect that Stockfish will try a little bit harder to keep more pawns in position where the engine has the advantage, and exchange more pawns in bad positions. STC: LLR: 2.93 (-2.94,2.94) {-0.20,1.10} Total: 42552 W: 3858 L: 3668 D: 35026 Ptnml(0-2): 152, 2956, 14876, 3134, 158 https://tests.stockfishchess.org/tests/view/606a06dd2b2df919fd5f0504 LTC: LLR: 2.95 (-2.94,2.94) {0.20,0.90} Total: 44328 W: 1703 L: 1531 D: 41094 Ptnml(0-2): 20, 1373, 19207, 1543, 21 https://tests.stockfishchess.org/tests/view/606aa4ec2b2df919fd5f053e Closes https://github.com/official-stockfish/Stockfish/pull/3420 Bench: 4310076 --- src/evaluate.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 437e753..789e285 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1091,8 +1091,8 @@ Value Eval::evaluate(const Position& pos) { // Scale and shift NNUE for compatibility with search and classical evaluation auto adjusted_NNUE = [&]() { - int material = pos.non_pawn_material() + 2 * PawnValueMg * pos.count(); - int scale = 641 + int material = pos.non_pawn_material() + 4 * PawnValueMg * pos.count(); + int scale = 580 + material / 32 - 4 * pos.rule50_count(); -- 1.7.0.4