]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Give a small penalty for bishop for each pawn on the same colored square
[stockfish] / src / evaluate.cpp
index 6990a71d2bbb306d945cfedebc94c659e1497475..3481b03d7c77ad2a01622eb7abd1960ffab7ca4a 100644 (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)))