X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=dd26e46986e9ad7fb57829ddf4ed5f3992f349cc;hb=818e0b2d2b0e2b2eaa8279c8f6684770dc4550e9;hp=3d9a3112fdc47167297d512d346d1c9bb344c622;hpb=9498b2af82e51a42b5baf6579faeb66589be9ebb;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 3d9a3112..dd26e469 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -289,14 +289,6 @@ namespace Eval { Weights[KingDangerUs] = weight_option("Cowardice", "Cowardice", WeightsInternal[KingDangerUs]); Weights[KingDangerThem] = weight_option("Aggressiveness", "Aggressiveness", WeightsInternal[KingDangerThem]); - // King safety is asymmetrical. Our king danger level is weighted by - // "Cowardice" UCI parameter, instead the opponent one by "Aggressiveness". - // If running in analysis mode, make sure we use symmetrical king safety. We - // do this by replacing both Weights[kingDangerUs] and Weights[kingDangerThem] - // by their average. - if (Options["UCI_AnalyseMode"]) - Weights[KingDangerUs] = Weights[KingDangerThem] = (Weights[KingDangerUs] + Weights[KingDangerThem]) / 2; - const int MaxSlope = 30; const int Peak = 1280; @@ -590,6 +582,10 @@ Value do_evaluate(const Position& pos, Value& margin) { && !more_than_one(BetweenBB[s][pos.king_square(Them)] & pos.pieces())) score += BishopPinBonus; + // Penalty for bishop with same coloured pawns + if (Piece == BISHOP) + score -= make_score(8, 12) * ei.pi->same_colored_pawn_count(s, Us); + // Bishop and knight outposts squares if ( (Piece == BISHOP || Piece == KNIGHT) && !(pos.pieces(Them, PAWN) & attack_span_mask(Us, s)))