X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=d5bf662aac8e6ccd6217a13f86f8aa2139cc8b2c;hp=6ae46f4199589c397596c1c18235414bcafe5601;hb=31a0d2200c7e8b1db653ba0c033783787259f1e6;hpb=e0a00c499654850108749ca6fd686f79188ac1f9 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 6ae46f41..d5bf662a 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -527,7 +527,8 @@ namespace { score -= ThreatenedByPawnPenalty[Piece]; // Bishop and knight outposts squares - if ((Piece == BISHOP || Piece == KNIGHT) && pos.square_is_weak(s, Us)) + if ( (Piece == BISHOP || Piece == KNIGHT) + && !(pos.pieces(PAWN, Them) & attack_span_mask(Us, s))) score += evaluate_outposts(pos, ei, s); // Queen or rook on 7th rank