const Score RookOnPawn = make_score(10, 28);
const Score RookOpenFile = make_score(43, 21);
const Score RookSemiopenFile = make_score(19, 10);
const Score BishopPawns = make_score( 8, 12);
const Score RookOnPawn = make_score(10, 28);
const Score RookOpenFile = make_score(43, 21);
const Score RookSemiopenFile = make_score(19, 10);
const Score BishopPawns = make_score( 8, 12);
const Score MinorBehindPawn = make_score(16, 0);
const Score UndefendedMinor = make_score(25, 10);
const Score TrappedRook = make_score(90, 0);
const Score MinorBehindPawn = make_score(16, 0);
const Score UndefendedMinor = make_score(25, 10);
const Score TrappedRook = make_score(90, 0);
// Bishop and knight outposts squares
if (!(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
score += evaluate_outposts<Pt, Us>(pos, ei, s);
// Bishop and knight outposts squares
if (!(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
score += evaluate_outposts<Pt, Us>(pos, ei, s);
// Rook piece attacking enemy pawns on the same rank/file
if (relative_rank(Us, s) >= RANK_5)
{
// Rook piece attacking enemy pawns on the same rank/file
if (relative_rank(Us, s) >= RANK_5)
{
- const Color Them = (Us == WHITE ? BLACK : WHITE);
- const Square Down = (Us == WHITE ? DELTA_S : DELTA_N);
- const Square DownDown = (Us == WHITE ? DELTA_SS : DELTA_NN);
+ const Color Them = (Us == WHITE ? BLACK : WHITE);
// Find the safe squares for our pieces inside the area defined by
// SpaceMask[]. A square is unsafe if it is attacked by an enemy
// Find the safe squares for our pieces inside the area defined by
// SpaceMask[]. A square is unsafe if it is attacked by an enemy
// Find all squares which are at most three squares behind some friendly pawn
Bitboard behind = pos.pieces(Us, PAWN);
// Find all squares which are at most three squares behind some friendly pawn
Bitboard behind = pos.pieces(Us, PAWN);
// Since SpaceMask[Us] is fully on our half of the board
assert(unsigned(safe >> (Us == WHITE ? 32 : 0)) == 0);
// Since SpaceMask[Us] is fully on our half of the board
assert(unsigned(safe >> (Us == WHITE ? 32 : 0)) == 0);