X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=3481b03d7c77ad2a01622eb7abd1960ffab7ca4a;hp=6990a71d2bbb306d945cfedebc94c659e1497475;hb=3e4dfb49a747be902d25ae06783f98ba29fb5030;hpb=c2902112e51b50c8ebcf263825597f437fdf56e7 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 6990a71d..3481b03d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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)))