Skip to content

Commit 3d58092

Browse files
committed
Retire KBBKN endgame
As pointed out by Joona, Lucas and otehr people in the forum, this endgame is not a known, there are many positions where it takes more than 50 moves to claim the win and becasue exact rules is not possible better to retire and allow the search to workout the endgame for us. bench: 8502826
1 parent db05b1f commit 3d58092

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/endgame.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ Endgames::Endgames() {
118118
add<KRKN>("KRKN");
119119
add<KQKP>("KQKP");
120120
add<KQKR>("KQKR");
121-
add<KBBKN>("KBBKN");
122121

123122
add<KNPK>("KNPK");
124123
add<KNPKB>("KNPKB");
@@ -348,29 +347,6 @@ Value Endgame<KQKR>::operator()(const Position& pos) const {
348347
}
349348

350349

351-
/// KBB vs KN. This is almost always a win. We try to push the enemy king to a corner
352-
/// and away from his knight. For a reference of this difficult endgame see:
353-
/// en.wikipedia.org/wiki/Chess_endgame#Effect_of_tablebases_on_endgame_theory
354-
355-
template<>
356-
Value Endgame<KBBKN>::operator()(const Position& pos) const {
357-
358-
assert(verify_material(pos, strongSide, 2 * BishopValueMg, 0));
359-
assert(verify_material(pos, weakSide, KnightValueMg, 0));
360-
361-
Square winnerKSq = pos.king_square(strongSide);
362-
Square loserKSq = pos.king_square(weakSide);
363-
Square knightSq = pos.list<KNIGHT>(weakSide)[0];
364-
365-
Value result = VALUE_KNOWN_WIN
366-
+ PushToCorners[loserKSq]
367-
+ PushClose[square_distance(winnerKSq, loserKSq)]
368-
+ PushAway[square_distance(loserKSq, knightSq)];
369-
370-
return strongSide == pos.side_to_move() ? result : -result;
371-
}
372-
373-
374350
/// Some cases of trivial draws
375351
template<> Value Endgame<KNNK>::operator()(const Position&) const { return VALUE_DRAW; }
376352
template<> Value Endgame<KmmKm>::operator()(const Position&) const { return VALUE_DRAW; }

src/endgame.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ enum EndgameType {
4242
KRKN, // KR vs KN
4343
KQKP, // KQ vs KP
4444
KQKR, // KQ vs KR
45-
KBBKN, // KBB vs KN
4645
KmmKm, // K and two minors vs K and one or two minors
4746

4847

0 commit comments

Comments
 (0)