Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bug in Bruja/Simon

Author: Joseph Tadeusz

Date: 06:46:32 06/17/05

Go up one level in this thread


On June 16, 2005 at 12:02:55, Joseph Tadeusz wrote:

>On June 16, 2005 at 07:47:35, Andrew Dados wrote:
>
>>On June 15, 2005 at 15:45:48, Dann Corbit wrote:
>>
>>>On June 15, 2005 at 15:26:17, Dan Honeycutt wrote:
>>>[snip]
>>>>Does this look right:
>>>>
>>>>int CanWin() {
>>>>  int can_win = 0;
>>>>  if (w_pawns || w_queens || w_rooks ||
>>>>    ((w_bishops + w_knights) > 1)) can_win |= 1;
>>>>  if (b_pawns || b_queens || b_rooks ||
>>>>    ((b_bishops + b_knights) > 1)) can_win |= 2;
>>>>  return can_win;
>>>>}
>>>
>>>It might return a false positive (e.g. two same square-color bishops) but that
>>>should not be a problem.  A false negative (e.g. two knights for one side
>>>actually can win) is far worse.
>>
>>One slight problem here:
>>[D]k7/8/NKnQ4/8/8/8/8/8 w - -
>>mate in 2: Qb8+ Nxb8 Nc7#
>>(well, accidentally Qf8 is also M2 ).
>>
>>-Andrew-
>
>It's a mate in one: Qxc6#

It works for this position (mate with knight only):

[D]k2n4/8/NKnQ4/8/8/8/8/8 w - - 0 1
Qb8+ Nxb8 Nc7#



This page took 0 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.