X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=7309f9f31a6c5e7c7de25bdaac4e75394f9f9f57;hp=76ffcf039a65622a978520c0353e493801bcff59;hb=ae9892788526a3809f490bbc20d85d458b987da3;hpb=c4c2e08f0d71c8e8f0bdfcb988a42b33243fd2ca diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 76ffcf03..7309f9f3 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -551,7 +551,6 @@ namespace { score += ThreatByRank * (int)relative_rank(Them, s); } - // Bonus for king attacks on pawns or pieces which are not pawn-defended if (weak & attackedBy[Us][KING]) score += ThreatByKing; @@ -576,7 +575,7 @@ namespace { b = shift(pos.pieces(Us, PAWN)) & ~pos.pieces(); b |= shift(b & TRank3BB) & ~pos.pieces(); - // Keep only the squares which are not completely unsafe + // Keep only the squares which are relatively safe b &= ~attackedBy[Them][PAWN] & (attackedBy[Us][ALL_PIECES] | ~attackedBy[Them][ALL_PIECES]);