X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=6d95fd58cb6cca53a1c968d7fbdaddf142f1e934;hp=445ba9cb00b3dcd49565962c5c3cb0c6209f5902;hb=a44c5cf4f77b05a0385c127b7c26cf086a73120e;hpb=a40ded2884b512a84afe9af9ff5782f6634d316f diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 445ba9cb..6d95fd58 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -89,7 +89,7 @@ namespace { // // Values modified by Joona Kiiski const Score WeightsInternal[] = { - S(252, 344), S(252, 259), S(46, 0), S(247, 0), S(259, 0) + S(252, 344), S(216, 266), S(46, 0), S(247, 0), S(259, 0) }; // MobilityBonus[PieceType][attacked] contains mobility bonuses for middle and @@ -462,8 +462,8 @@ namespace { // no minor piece which can exchange the outpost piece. if (bonus && bit_is_set(ei.attackedBy[Us][PAWN], s)) { - if ( pos.pieces(KNIGHT, Them) == EmptyBoardBB - && (SquaresByColorBB[color_of(s)] & pos.pieces(BISHOP, Them)) == EmptyBoardBB) + if ( !pos.pieces(KNIGHT, Them) + && !(SquaresByColorBB[color_of(s)] & pos.pieces(BISHOP, Them))) bonus += bonus + bonus / 2; else bonus += bonus / 2; @@ -488,7 +488,7 @@ namespace { const Color Them = (Us == WHITE ? BLACK : WHITE); const Square* pl = pos.piece_list(Us, Piece); - ei.attackedBy[Us][Piece] = EmptyBoardBB; + ei.attackedBy[Us][Piece] = 0; while ((s = *pl++) != SQ_NONE) { @@ -850,7 +850,7 @@ namespace { // Increase the bonus if the passed pawn is supported by a friendly pawn // on the same rank and a bit smaller if it's on the previous rank. - supportingPawns = pos.pieces(PAWN, Us) & neighboring_files_bb(s); + supportingPawns = pos.pieces(PAWN, Us) & neighboring_files_bb(file_of(s)); if (supportingPawns & rank_bb(s)) ebonus += Value(r * 20); @@ -979,7 +979,7 @@ namespace { pliesToGo = 2 * movesToGo - int(loserSide == pos.side_to_move()); // Generate list of blocking pawns and supporters - supporters = neighboring_files_bb(s) & candidates; + supporters = neighboring_files_bb(file_of(s)) & candidates; opposed = squares_in_front_of(loserSide, s) & pos.pieces(PAWN, winnerSide); blockers = passed_pawn_mask(loserSide, s) & pos.pieces(PAWN, winnerSide);