X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=2414d5a0932771196e6000c46769cf8734208f1e;hp=d9aae3d32bd3667a2b7daa415afeaf7c38b9380e;hb=ddecdc97d71e07536d1b1a23ffca7b0475a5b480;hpb=fa24cc25a43da5ac41a086edda02dfc2e8e9b830 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index d9aae3d3..2414d5a0 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -209,7 +209,6 @@ namespace { const int KingAttackWeights[PIECE_TYPE_NB] = { 0, 0, 78, 56, 45, 11 }; // Penalties for enemy's safe checks - const int QueenContactCheck = 997; const int QueenCheck = 745; const int RookCheck = 688; const int BishopCheck = 588; @@ -430,15 +429,9 @@ namespace { - 717 * !pos.count(Them) - 7 * mg_value(score) / 5 - 5; - // Analyse the enemy's safe queen contact checks. Firstly, find the - // undefended squares around our king reachable by the enemy queen... - b = undefended & ei.attackedBy[Them][QUEEN] & ~pos.pieces(Them); - - // ...and keep squares supported by another enemy piece. - kingDanger += QueenContactCheck * popcount(b & ei.attackedBy2[Them]); - // Analyse the safe enemy's checks which are possible on next move - safe = ~(ei.attackedBy[Us][ALL_PIECES] | pos.pieces(Them)); + safe = ~pos.pieces(Them); + safe &= ~ei.attackedBy[Us][ALL_PIECES] | (undefended & ei.attackedBy2[Them]); b1 = pos.attacks_from(ksq); b2 = pos.attacks_from(ksq);