X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=e29b9b0f43ba9306fc39425a4bdadec829b9244d;hp=984a85a65e0492c3daaa46ddc72f06709ae32487;hb=57797822f81386fc277de73599a05ad06a7dc7b6;hpb=7062db7cb25a322a3c6bc18b06f1df2dc6431ef8 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 984a85a6..e29b9b0f 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -577,6 +577,12 @@ Value do_evaluate(const Position& pos, Value& margin) { mobility += MobilityBonus[Piece][mob]; + if (Piece == BISHOP && (PseudoAttacks[Piece][pos.king_square(Them)] & s)) { + const Bitboard between = BetweenBB[s][pos.king_square(Them)] & pos.pieces(); + if (!more_than_one(between)) + score += make_score(25, 25); + } + // Decrease score if we are attacked by an enemy pawn. Remaining part // of threat evaluation must be done later when we have full attack info. if (ei.attackedBy[Them][PAWN] & s)