From 70ac5ecbb62b68382073b2367644945c1327ddfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ste=CC=81phane=20Nicolet?= Date: Sun, 20 Jun 2021 10:29:20 +0200 Subject: [PATCH] Keep more pawns and pieces when attacking This patch increase the weight of pawns and pieces from 28 to 32 in the scaling formula we apply to the output of the NNUE pure eval. Increasing this gradient for pawns and pieces means that Stockfish will try a little harder to keep material when she has the advantage, and try a little bit harder to escape into an endgame when she is under pressure. STC: LLR: 2.93 (-2.94,2.94) <-0.50,2.50> Total: 53168 W: 4371 L: 4177 D: 44620 Ptnml(0-2): 160, 3389, 19283, 3601, 151 https://tests.stockfishchess.org/tests/view/60cefd1d457376eb8bcab7ab LTC: LLR: 2.94 (-2.94,2.94) <0.50,3.50> Total: 10888 W: 386 L: 288 D: 10214 Ptnml(0-2): 3, 260, 4821, 356, 4 https://tests.stockfishchess.org/tests/view/60cf709d2114332881e7352b closes https://github.com/official-stockfish/Stockfish/pull/3571 Bench: 4965430 --- src/evaluate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index fe136614..1366d0fb 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1091,8 +1091,9 @@ Value Eval::evaluate(const Position& pos) { // Scale and shift NNUE for compatibility with search and classical evaluation auto adjusted_NNUE = [&]() { - - int scale = 903 + 28 * pos.count() + 28 * pos.non_pawn_material() / 1024; + int scale = 903 + + 32 * pos.count() + + 32 * pos.non_pawn_material() / 1024; Value nnue = NNUE::evaluate(pos, true) * scale / 1024; -- 2.39.2