- + PushClose[square_distance(winnerKSq, loserKSq)];
-
- return strongSide == pos.side_to_move() ? result : -result;
-}
-
-
-/// KBB vs KN. This is almost always a win. We try to push 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<KBBKN>::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<KNIGHT>(weakSide)[0];
-
- Value result = VALUE_KNOWN_WIN
- + PushToCorners[loserKSq]
- + PushClose[square_distance(winnerKSq, loserKSq)]
- + PushAway[square_distance(loserKSq, knightSq)];