mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Sync with master
bench: 7699138
This commit is contained in:
@@ -61,6 +61,14 @@ namespace {
|
|||||||
// Unsupported pawn penalty
|
// Unsupported pawn penalty
|
||||||
const Score UnsupportedPawnPenalty = S(20, 10);
|
const Score UnsupportedPawnPenalty = S(20, 10);
|
||||||
|
|
||||||
|
// Center bind bonus: Two pawns controlling the same central square
|
||||||
|
const Bitboard CenterBindMask[COLOR_NB] = {
|
||||||
|
(FileDBB | FileEBB) & (Rank5BB | Rank6BB | Rank7BB),
|
||||||
|
(FileDBB | FileEBB) & (Rank4BB | Rank3BB | Rank2BB)
|
||||||
|
};
|
||||||
|
|
||||||
|
const Score CenterBind = S(16, 0);
|
||||||
|
|
||||||
// Weakness of our pawn shelter in front of the king by [distance from edge][rank]
|
// Weakness of our pawn shelter in front of the king by [distance from edge][rank]
|
||||||
const Value ShelterWeakness[][RANK_NB] = {
|
const Value ShelterWeakness[][RANK_NB] = {
|
||||||
{ V( 99), V(20), V(26), V(54), V(85), V( 92), V(108) },
|
{ V( 99), V(20), V(26), V(54), V(85), V( 92), V(108) },
|
||||||
@@ -195,6 +203,10 @@ namespace {
|
|||||||
b = e->semiopenFiles[Us] ^ 0xFF;
|
b = e->semiopenFiles[Us] ^ 0xFF;
|
||||||
e->pawnSpan[Us] = b ? int(msb(b) - lsb(b)) : 0;
|
e->pawnSpan[Us] = b ? int(msb(b) - lsb(b)) : 0;
|
||||||
|
|
||||||
|
// Center binds: Two pawns controlling the same central square
|
||||||
|
b = shift_bb<Right>(ourPawns) & shift_bb<Left>(ourPawns) & CenterBindMask[Us];
|
||||||
|
score += popcount<Max15>(b) * CenterBind;
|
||||||
|
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user