Give a small penalty for bishop for each pawn on the same colored square

This commit is contained in:
Joona Kiiski
2013-04-16 21:20:31 +01:00
parent fe72c93141
commit 3e4dfb49a7
5 changed files with 16 additions and 1 deletions

View File

@@ -582,6 +582,10 @@ Value do_evaluate(const Position& pos, Value& margin) {
&& !more_than_one(BetweenBB[s][pos.king_square(Them)] & pos.pieces()))
score += BishopPinBonus;
// Penalty for bishop with same coloured pawns
if (Piece == BISHOP)
score -= make_score(4, 4) * ei.pi->same_colored_pawn_count(s, Us);
// Bishop and knight outposts squares
if ( (Piece == BISHOP || Piece == KNIGHT)
&& !(pos.pieces(Them, PAWN) & attack_span_mask(Us, s)))