// ThreatenedByPawn[PieceType] contains a penalty according to which piece
// type is attacked by an enemy pawn.
- const Score ThreatenedByPawn[] = {
+ const Score ThreatenedByPawn[PIECE_TYPE_NB] = {
- S(0, 0), S(0, 0), S(87, 118), S(84, 122), S(114, 203), S(121, 217)
+ S(0, 0), S(0, 0), S(107, 138), S(84, 122), S(114, 203), S(121, 217)
};
// Assorted bonuses and penalties used by evaluation
opposed = theirPawns & forward_bb(Us, s);
passed = !(theirPawns & passed_pawn_mask(Us, s));
lever = theirPawns & pawnAttacksBB[s];
+ phalanx = neighbours & rank_bb(s);
+ supported = neighbours & rank_bb(s - Up);
+ connected = supported | phalanx;
+ isolated = !neighbours;
// Test for backward pawn.
- // If the pawn is passed, isolated, connected or a lever it cannot be
+ // If the pawn is passed, isolated, lever or connected it cannot be
// backward. If there are friendly pawns behind on adjacent files
// it cannot be backward either.
if ( (passed | isolated | lever | connected)