Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bug in Bruja/Simon

Author: Uri Blass

Date: 01:25:50 06/14/05

Go up one level in this thread


On June 13, 2005 at 21:51:18, Dan Honeycutt wrote:

>
>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.

If I understand correctly bruja assumes that a side with only 2 knights cannot
win.

It is wrong and the results is that
Bruja cannot see simple mates except mate in 1 for the side to move.


[D]8/8/8/8/6n1/6k1/4n1B1/7K w - - 0 1

[D]8/8/5n2/8/8/6k1/4n1B1/7K b - - 0 1



Uri



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.