const Score OtherCheck = S(10, 10);
const Score CloseEnemies = S( 7, 0);
const Score PawnlessFlank = S(20, 80);
- const Score LooseEnemies = S( 0, 25);
const Score ThreatByHangingPawn = S(71, 61);
const Score ThreatByRank = S(16, 3);
const Score Hanging = S(48, 27);
Bitboard b, weak, defended, safeThreats;
Score score = SCORE_ZERO;
- // Small bonus if the opponent has loose pawns or pieces
- if ( (pos.pieces(Them) ^ pos.pieces(Them, QUEEN, KING))
- & ~(ei.attackedBy[Us][ALL_PIECES] | ei.attackedBy[Them][ALL_PIECES]))
- score += LooseEnemies;
-
// Non-pawn enemies attacked by a pawn
weak = (pos.pieces(Them) ^ pos.pieces(Them, PAWN)) & ei.attackedBy[Us][PAWN];