X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=c5af2f89524e5f9c04b89bb5c1780d8caa105911;hp=945fb4e44299dafab044810ac09ae72d4e6c0142;hb=2a0bbb9faa7884b486579e095b7ebc25205f1347;hpb=e95e69515a8e30bcdcef84bd37656c3ea3099cd5 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 945fb4e4..c5af2f89 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -530,7 +530,7 @@ Value do_evaluate(const Position& pos, Value& margin) { // Bishop and knight outposts squares if ( (Piece == BISHOP || Piece == KNIGHT) - && !(pos.pieces(Them, PAWN) & attack_span_mask(Us, s))) + && !(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s))) score += evaluate_outposts(pos, ei, s); if ( (Piece == ROOK || Piece == QUEEN) @@ -821,7 +821,8 @@ Value do_evaluate(const Position& pos, Value& margin) { // If there is an enemy rook or queen attacking the pawn from behind, // add all X-ray attacks by the rook or queen. Otherwise consider only // the squares in the pawn's path attacked or occupied by the enemy. - if (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN) & pos.attacks_from(s)) + if ( (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN)) // Unlikely + && (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN) & pos.attacks_from(s))) unsafeSquares = squaresToQueen; else unsafeSquares = squaresToQueen & (ei.attackedBy[Them][ALL_PIECES] | pos.pieces(Them)); @@ -989,7 +990,7 @@ Value do_evaluate(const Position& pos, Value& margin) { // black pawns: a4, b4 white: b2 then pawn in b4 is giving support. if (!opposed) { - b2 = supporters & in_front_bb(winnerSide, blockSq + pawn_push(winnerSide)); + b2 = supporters & in_front_bb(winnerSide, rank_of(blockSq + pawn_push(winnerSide))); while (b2) // This while-loop could be replaced with LSB/MSB (depending on color) { @@ -999,7 +1000,7 @@ Value do_evaluate(const Position& pos, Value& margin) { } // Check pawns that can be sacrificed against the blocking pawn - b2 = attack_span_mask(winnerSide, blockSq) & candidates & ~(1ULL << s); + b2 = pawn_attack_span(winnerSide, blockSq) & candidates & ~(1ULL << s); while (b2) // This while-loop could be replaced with LSB/MSB (depending on color) {