mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Scale eval when down to only one pawn
Passed both short TC LLR: 2.97 (-2.94,2.94) [-1.50,4.50] Total: 11921 W: 2346 L: 2208 D: 7367 And long TC LLR: 2.97 (-2.94,2.94) [0.00,6.00] Total: 21002 W: 3395 L: 3197 D: 14410 bench: 7602383
This commit is contained in:
@@ -246,6 +246,16 @@ Entry* probe(const Position& pos, Table& entries, Endgames& endgames) {
|
||||
(npm_w == npm_b || npm_b < RookValueMg ? 0 : NoPawnsSF[std::min(pos.count<BISHOP>(BLACK), 2)]);
|
||||
}
|
||||
|
||||
if (pos.count<PAWN>(WHITE) == 1 && npm_w - npm_b <= BishopValueMg)
|
||||
{
|
||||
e->factor[WHITE] = (uint8_t) SCALE_FACTOR_ONEPAWN;
|
||||
}
|
||||
|
||||
if (pos.count<PAWN>(BLACK) == 1 && npm_b - npm_w <= BishopValueMg)
|
||||
{
|
||||
e->factor[BLACK] = (uint8_t) SCALE_FACTOR_ONEPAWN;
|
||||
}
|
||||
|
||||
// Compute the space weight
|
||||
if (npm_w + npm_b >= 2 * QueenValueMg + 4 * RookValueMg + 2 * KnightValueMg)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user