- // King attack, mobility and outposts
- evaluate_common(p, b, us, ei, KnightAttackWeight, MidgameKnightMobilityBonus,
- EndgameKnightMobilityBonus, s, KnightOutpostBonus);
- }
-
-
- // evaluate_bishop() assigns bonuses and penalties to a bishop of a given
- // color on a given square.
-
- void evaluate_bishop(const Position &p, Square s, Color us, EvalInfo &ei) {
-
- Bitboard b = bishop_attacks_bb(s, p.occupied_squares() & ~p.queens(us));
- ei.attackedBy[us][BISHOP] |= b;
-
- // King attack, mobility and outposts
- evaluate_common(p, b, us, ei, BishopAttackWeight, MidgameBishopMobilityBonus,
- EndgameBishopMobilityBonus, s, BishopOutpostBonus);
- }
-
-
- // evaluate_rook() assigns bonuses and penalties to a rook of a given
- // color on a given square.
-
- void evaluate_rook(const Position &p, Square s, Color us, EvalInfo &ei) {
-
- Bitboard b = rook_attacks_bb(s, p.occupied_squares() & ~p.rooks_and_queens(us));
- ei.attackedBy[us][ROOK] |= b;
-
- // King attack and mobility
- int mob = evaluate_common(p, b, us, ei, RookAttackWeight, MidgameRookMobilityBonus,
- EndgameRookMobilityBonus);
-
- // Rook on 7th rank
- Color them = opposite_color(us);
-
- if ( relative_rank(us, s) == RANK_7
- && relative_rank(us, p.king_square(them)) == RANK_8)