Author: Dan Honeycutt
Date: 18:51:18 06/13/05
My thanks to Chris Conkie for testing Bruja with the following position which
arises just about every day:
[D]2n1k1n1/1n1n1n1n/n1n1n1n1/8/8/1N1N1N1N/N1N1N1N1/1N1K1N2 w - - 0 1
Bruja would not search the position. On digging, I found that Bruja evaluates
the position as a draw due to insufficient material even though both sides have
a generous amount of material. The problem was in the following function which
I give in full for those using Simon.
Original
========
int CanWin() {
int can_win = 0;
if (w_pawns || w_queens || w_rooks || (w_bishops > 1) ||
(w_bishops && w_knights)) can_win |= 1;
if (b_pawns || b_queens || b_rooks || (b_bishops > 1) ||
(b_bishops && b_knights)) can_win |= 2;
return can_win;
}
Corrected
=========
int CanWin() {
int can_win = 0;
if (w_pawns || w_queens || w_rooks || (w_bishops > 1) ||
(w_bishops && w_knights) || (w_knights > 2)) can_win |= 1;
if (b_pawns || b_queens || b_rooks || (b_bishops > 1) ||
(b_bishops && b_knights) || (b_knights > 2)) can_win |= 2;
return can_win;
}
To Dann Corbit: can you update the current Simon?
Bruja will be fixed with the next release, but I do not plan to make a special
release for this.
Best
Dan H.
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.