X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fendgame.cpp;h=1a5959e5fea8e4120844d5ac8c868c16c4626a5f;hb=58746d9fb8bab4e9617cd7c809c6a0afd809c35e;hp=56583c58890ffb6f7aac25979987719388407477;hpb=ddcbacd04d1c860e808202ce8c1206c8acdca627;p=stockfish diff --git a/src/endgame.cpp b/src/endgame.cpp index 56583c58..1a5959e5 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -80,7 +80,6 @@ namespace Endgames { add("KNNKP"); add("KNPK"); - add("KNPKB"); add("KRPKR"); add("KRPKB"); add("KBPKB"); @@ -733,27 +732,6 @@ ScaleFactor Endgame::operator()(const Position& pos) const { } -/// KNP vs KB. If knight can block bishop from taking pawn, it's a win. -/// Otherwise the position is drawn. -template<> -ScaleFactor Endgame::operator()(const Position& pos) const { - - assert(verify_material(pos, strongSide, KnightValueMg, 1)); - assert(verify_material(pos, weakSide, BishopValueMg, 0)); - - Square pawnSq = pos.square(strongSide); - Square bishopSq = pos.square(weakSide); - Square weakKingSq = pos.square(weakSide); - - // King needs to get close to promoting pawn to prevent knight from blocking. - // Rules for this are very tricky, so just approximate. - if (forward_file_bb(strongSide, pawnSq) & pos.attacks_from(bishopSq)) - return ScaleFactor(distance(weakKingSq, pawnSq)); - - return SCALE_FACTOR_NONE; -} - - /// KP vs KP. This is done by removing the weakest side's pawn and probing the /// KP vs K bitbase: If the weakest side has a draw without the pawn, it probably /// has at least a draw with the pawn as well. The exception is when the stronger