1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

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
This commit is contained in:
Stéphane Nicolet 2021-04-04 10:51:45 +02:00
parent b862c8d4be
commit f40913f7f6

View file

@ -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<PAWN>();
int scale = 641
int material = pos.non_pawn_material() + 4 * PawnValueMg * pos.count<PAWN>();
int scale = 580
+ material / 32
- 4 * pos.rule50_count();