X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=64b1bf4cf750d8d0902ce6f9d22c189eb175480b;hb=ad937d0b2d2a9450686b9f3412c891a68ff19310;hp=be53a73ee886633bc7775c3453856a50531e78e6;hpb=d3ffd0ffcad5e467fffd67d82d031fa1cbdba7d2;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index be53a73e..64b1bf4c 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -17,10 +17,10 @@ along with this program. If not, see . */ +#include #include #include #include -#include #include "bitcount.h" #include "evaluate.h" @@ -169,7 +169,6 @@ namespace { const Score RookSemiopenFile = make_score(19, 10); const Score BishopPawns = make_score( 8, 12); const Score MinorBehindPawn = make_score(16, 0); - const Score UndefendedMinor = make_score(25, 10); const Score TrappedRook = make_score(90, 0); const Score Unstoppable = make_score( 0, 20); @@ -520,16 +519,9 @@ namespace { const Color Them = (Us == WHITE ? BLACK : WHITE); - Bitboard b, undefendedMinors, weakEnemies; + Bitboard b, weakEnemies; Score score = SCORE_ZERO; - // Undefended minors get penalized even if they are not under attack - undefendedMinors = pos.pieces(Them, BISHOP, KNIGHT) - & ~ei.attackedBy[Them][ALL_PIECES]; - - if (undefendedMinors) - score += UndefendedMinor; - // Enemies not defended by a pawn and under our attack weakEnemies = pos.pieces(Them) & ~ei.attackedBy[Them][PAWN] @@ -791,7 +783,7 @@ namespace { Value v = mg_value(score) * int(ei.mi->game_phase()) + eg_value(score) * int(PHASE_MIDGAME - ei.mi->game_phase()) * sf / SCALE_FACTOR_NORMAL; - v /= PHASE_MIDGAME; + v /= int(PHASE_MIDGAME); // In case of tracing add all single evaluation contributions for both white and black if (Trace)