H.G.Muller wrote:And how deep does the search have to be to find these mates, with such an evaluation?
My program needs 5 plies of search to win KBN vs K against Fruit 2.1. I am not sure 5 plies would be enough to win against TB defence, but I would be surprised if one or two extra plies would not be sufficient. Even at 7 plies, the whole game takes less than 5 seconds, so I don't consider it a problem.
I use the following very simple eval for KBN vs K:
- Code: Select all
int DistanceBonus[8] = {0, 0, 100, 80, 60, 40, 20, 10};
uint8 KBNKtable[128] = {
200, 190, 180, 170, 160, 150, 140, 130, 0, 0, 0, 0, 0, 0, 0, 0,
190, 180, 170, 160, 150, 140, 130, 140, 0, 0, 0, 0, 0, 0, 0, 0,
180, 170, 155, 140, 140, 125, 140, 150, 0, 0, 0, 0, 0, 0, 0, 0,
170, 160, 140, 120, 110, 140, 150, 160, 0, 0, 0, 0, 0, 0, 0, 0,
160, 150, 140, 110, 120, 140, 160, 170, 0, 0, 0, 0, 0, 0, 0, 0,
150, 140, 125, 140, 140, 155, 170, 180, 0, 0, 0, 0, 0, 0, 0, 0,
140, 130, 140, 150, 160, 170, 180, 190, 0, 0, 0, 0, 0, 0, 0, 0,
130, 140, 150, 160, 170, 180, 190, 200, 0, 0, 0, 0, 0, 0, 0, 0
};
int kbnk_eval(const position_t *pos) {
int winner, loser;
int wksq, bksq, bsq, nsq, sign;
winner = pos->material[WHITE]? WHITE : BLACK;
loser = winner^1;
sign = (winner == pos->side)? 1 : -1;
wksq = KingSquare(pos, winner); bksq = KingSquare(pos, loser);
bsq = BishopListStart(pos, winner); nsq = KnightListStart(pos, winner);
if((file(bsq) + rank(bsq)) % 2) {
wksq ^= 7; bksq ^= 7; bsq ^= 7; nsq ^= 7;
}
return sign*(KNOWN_WIN + DistanceBonus[Distance[wksq-bksq]] +
KBNKtable[bksq]);
}
Tord