mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 02:57:11 +08:00
Bonus for file distance of the outermost pawns
In endgame it's better to have pawns on both wings. So give a bonus according to file distance between left and right outermost pawns. Passed both short TC LLR: 2.97 (-2.94,2.94) [-1.50,4.50] Total: 39073 W: 7749 L: 7536 D: 23788 And long TC LLR: 2.96 (-2.94,2.94) [0.00,6.00] Total: 6149 W: 1040 L: 910 D: 4199 bench: 7665034
This commit is contained in:
committed by
Marco Costalba
parent
899a2c033e
commit
cf0a2a26a9
@@ -57,6 +57,9 @@ namespace {
|
|||||||
S( 0, 0), S( 6, 13), S(6,13), S(14,29),
|
S( 0, 0), S( 6, 13), S(6,13), S(14,29),
|
||||||
S(34,68), S(83,166), S(0, 0), S( 0, 0) };
|
S(34,68), S(83,166), S(0, 0), S( 0, 0) };
|
||||||
|
|
||||||
|
// Bonus for file distance of the two outermost pawns
|
||||||
|
const Score PawnsFileSpan = S(0, 10);
|
||||||
|
|
||||||
// Weakness of our pawn shelter in front of the king indexed by [rank]
|
// Weakness of our pawn shelter in front of the king indexed by [rank]
|
||||||
const Value ShelterWeakness[RANK_NB] =
|
const Value ShelterWeakness[RANK_NB] =
|
||||||
{ V(100), V(0), V(27), V(73), V(92), V(101), V(101) };
|
{ V(100), V(0), V(27), V(73), V(92), V(101), V(101) };
|
||||||
@@ -181,6 +184,14 @@ namespace {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In endgame it's better to have pawns on both wings. So give a bonus according
|
||||||
|
// to file distance between left and right outermost pawns.
|
||||||
|
if (pos.count<PAWN>(Us) > 1)
|
||||||
|
{
|
||||||
|
b = ~e->semiopenFiles[Us] & 0xFF;
|
||||||
|
value += PawnsFileSpan * int(msb(b) - lsb(b));
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user