Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
// Pawn penalties
constexpr Score Backward = S( 6, 23);
constexpr Score Doubled = S(13, 53);
// Pawn penalties
constexpr Score Backward = S( 6, 23);
constexpr Score Doubled = S(13, 53);
constexpr Score Isolated = S( 2, 15);
constexpr Score WeakLever = S( 5, 57);
constexpr Score WeakUnopposed = S(16, 22);
constexpr Score Isolated = S( 2, 15);
constexpr Score WeakLever = S( 5, 57);
constexpr Score WeakUnopposed = S(16, 22);
Bitboard neighbours, stoppers, support, phalanx, opposed;
Bitboard lever, leverPush, blocked;
Bitboard neighbours, stoppers, support, phalanx, opposed;
Bitboard lever, leverPush, blocked;
// A pawn is backward when it is behind all pawns of the same color on
// the adjacent files and cannot safely advance.
backward = !(neighbours & forward_ranks_bb(Them, s + Up))
// A pawn is backward when it is behind all pawns of the same color on
// the adjacent files and cannot safely advance.
backward = !(neighbours & forward_ranks_bb(Them, s + Up))