X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=c50bb08ae500e506e04c98cec6abbb65e0f21c15;hp=dbb98310239903e4215b72bcb25fac25635e0759;hb=1d1b7df7c6b3496d1a3fe926cadf25d91e1558f6;hpb=c9dcda6ac488c0058ebd567e1f52e30b8cd0db20 diff --git a/src/endgame.cpp b/src/endgame.cpp index dbb98310..c50bb08a 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -118,7 +118,6 @@ Endgames::Endgames() { add("KRKN"); add("KQKP"); add("KQKR"); - add("KBBKN"); add("KNPK"); add("KNPKB"); @@ -348,32 +347,8 @@ Value Endgame::operator()(const Position& pos) const { } -/// KBB vs KN. This is almost always a win. We try to push the enemy king to a corner -/// and away from his knight. For a reference of this difficult endgame see: -/// en.wikipedia.org/wiki/Chess_endgame#Effect_of_tablebases_on_endgame_theory - -template<> -Value Endgame::operator()(const Position& pos) const { - - assert(verify_material(pos, strongSide, 2 * BishopValueMg, 0)); - assert(verify_material(pos, weakSide, KnightValueMg, 0)); - - Square winnerKSq = pos.king_square(strongSide); - Square loserKSq = pos.king_square(weakSide); - Square knightSq = pos.list(weakSide)[0]; - - Value result = VALUE_KNOWN_WIN - + PushToCorners[loserKSq] - + PushClose[square_distance(winnerKSq, loserKSq)] - + PushAway[square_distance(loserKSq, knightSq)]; - - return strongSide == pos.side_to_move() ? result : -result; -} - - /// Some cases of trivial draws template<> Value Endgame::operator()(const Position&) const { return VALUE_DRAW; } -template<> Value Endgame::operator()(const Position&) const { return VALUE_DRAW; } /// KB and one or more pawns vs K. It checks for draws with rook pawns and @@ -817,7 +792,7 @@ ScaleFactor Endgame::operator()(const Position& pos) const { /// KNP vs K. There is a single rule: if the pawn is a rook pawn on the 7th rank -/// and the defending king prevents the pawn from advancing the position is drawn. +/// and the defending king prevents the pawn from advancing, the position is drawn. template<> ScaleFactor Endgame::operator()(const Position& pos) const {