X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=ec040f63a0bad5227e9813a9966f0b55e931e37b;hp=63c0f1f80906076b84fdddf48a1f4df51801525b;hb=cca34e234cc98ed4b61e75a25f8cd0d917c2a3fa;hpb=d50b33cacd25483998a4bdc99038f4d1666c5d53 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 63c0f1f8..ec040f63 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -583,9 +583,9 @@ Value do_evaluate(const Position& pos, Value& margin) { const enum Piece P = make_piece(Us, PAWN); Square d = pawn_push(Us) + (file_of(s) == FILE_A ? DELTA_E : DELTA_W); if (pos.piece_on(s + d) == P) - score -= !pos.is_empty(s + d + pawn_push(Us)) ? TrappedBishopA1H1 * 4 - : pos.piece_on(s + d + d) == P ? TrappedBishopA1H1 * 2 - : TrappedBishopA1H1; + score -= !pos.empty(s + d + pawn_push(Us)) ? TrappedBishopA1H1 * 4 + : pos.piece_on(s + d + d) == P ? TrappedBishopA1H1 * 2 + : TrappedBishopA1H1; } } @@ -797,7 +797,7 @@ Value do_evaluate(const Position& pos, Value& margin) { { Square s = pop_lsb(&b); - assert(pos.pawn_is_passed(Us, s)); + assert(pos.pawn_passed(Us, s)); int r = int(relative_rank(Us, s) - RANK_2); int rr = r * (r - 1); @@ -819,7 +819,7 @@ Value do_evaluate(const Position& pos, Value& margin) { ebonus -= Value(square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr); // If the pawn is free to advance, increase bonus - if (pos.is_empty(blockSq)) + if (pos.empty(blockSq)) { squaresToQueen = forward_bb(Us, s);