X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=3481b03d7c77ad2a01622eb7abd1960ffab7ca4a;hp=cb5e284644e92bbbc0f548e281c1d0cc2c451fde;hb=3e4dfb49a747be902d25ae06783f98ba29fb5030;hpb=d3fe153fe6fcf36ccfc0a61681c16f1a98fcddf2 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index cb5e2846..3481b03d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -88,7 +88,7 @@ namespace { // // Values modified by Joona Kiiski const Score WeightsInternal[] = { - S(252, 344), S(216, 266), S(46, 0), S(247, 0), S(259, 0) + S(289, 344), S(221, 273), S(46, 0), S(271, 0), S(307, 0) }; // MobilityBonus[PieceType][attacked] contains mobility bonuses for middle and @@ -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(4, 4) * 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)))