X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=db67ce95cf92923b012cfeb31b3ef28560f16771;hp=55e4483dbe84a22c0d456b2a2994fc7e0256ca3d;hb=255df4ffae29f4a038c9881c1f2f675e2f21f71e;hpb=759b3c79cf94d101163f646b1eb2a9f9c64293ab diff --git a/src/endgame.cpp b/src/endgame.cpp index 55e4483d..db67ce95 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -631,29 +631,8 @@ ScaleFactor Endgame::operator()(const Position& pos) const { // Case 2: Opposite colored bishops if (opposite_colors(strongBishopSq, weakBishopSq)) - { - // We assume that the position is drawn in the following three situations: - // - // a. The pawn is on rank 5 or further back. - // b. The defending king is somewhere in the pawn's path. - // c. The defending bishop attacks some square along the pawn's path, - // and is at least three squares away from the pawn. - // - // These rules are probably not perfect, but in practice they work - // reasonably well. - - if (relative_rank(strongSide, pawnSq) <= RANK_5) - return SCALE_FACTOR_DRAW; - - Bitboard path = forward_file_bb(strongSide, pawnSq); - - if (path & pos.pieces(weakSide, KING)) - return SCALE_FACTOR_DRAW; + return SCALE_FACTOR_DRAW; - if ( (pos.attacks_from(weakBishopSq) & path) - && distance(weakBishopSq, pawnSq) >= 3) - return SCALE_FACTOR_DRAW; - } return SCALE_FACTOR_NONE; }