Skip to content

Commit 70ac5ec

Browse files
committed
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 official-stockfish#3571 Bench: 4965430
1 parent ba01f4b commit 70ac5ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/evaluate.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,8 +1091,9 @@ Value Eval::evaluate(const Position& pos) {
10911091
// Scale and shift NNUE for compatibility with search and classical evaluation
10921092
auto adjusted_NNUE = [&]()
10931093
{
1094-
1095-
int scale = 903 + 28 * pos.count<PAWN>() + 28 * pos.non_pawn_material() / 1024;
1094+
int scale = 903
1095+
+ 32 * pos.count<PAWN>()
1096+
+ 32 * pos.non_pawn_material() / 1024;
10961097

10971098
Value nnue = NNUE::evaluate(pos, true) * scale / 1024;
10981099

0 commit comments

Comments
 (0)