Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bug in CHEST - CHEST doesn't see a mate in 2 (will be corrected)

Author: Heiner Marxen

Date: 19:00:22 04/28/02

Go up one level in this thread


On April 28, 2002 at 18:18:38, Heiner Marxen wrote:

>On April 28, 2002 at 08:00:15, Vincent Vega wrote:
>
>>Simplified position to show the bug:
>>[D]8/8/8/8/8/8/4KP2/R1Qn3k w - - 0 1
>>
>>This is a mate in 2 (1. Qxd1+).
>>
>>But CHEST says:
>>
>>CHEST version 3.19, 18-Dec-1999
>>Input file: 'xx'
>>Reading job:
>>#	xx
>>W:  Ke2 Qc1 Ra1 Pf2 (4)
>>B:  Kh1 Nd1 (2)
>>FEN: 8/8/8/8/8/8/4KP2/R1Qn3k w - -
>>analysing (mate in 2 moves):
>>No solution in 2 moves.
>>refu  1: Qxd1+   --      [  1-]   M2: move
>>refu  2: Qc6+    --      [  1-]   M2: move
>>refu  3: Qh6+    Kg1     [  1-]
>>refu  4: f3      --      [  1-]   M2: move
>>refu  5: f4      --      [  1-]   M2: move
>>refu  6: Rb1     --      [  1-]   M2: move
>>refu  7: Ra2     --      [  1-]   M2: move
>>refu  8: Ra3     --      [  1-]   M2: move
>>refu  9: Ra4     --      [  1-]   M2: move
>>refu 10: Ra5     --      [  1-]   M2: move
>>refu 11: Ra6     --      [  1-]   M2: move
>>refu 12: Ra7     --      [  1-]   M2: move
>>refu 13: Ra8     --      [  1-]   M2: move
>>refu 14: Qb1     --      [  1-]   M2: move
>>refu 15: Qc2     --      [  1-]   M2: move
>>refu 16: Qc3     --      [  1-]   M2: move
>>refu 17: Qc4     --      [  1-]   M2: move
>>refu 18: Qc5     --      [  1-]   M2: move
>>refu 19: Qc7     Kg1     [  1-]
>>refu 20: Qc8     --      [  1-]   M2: move
>>refu 21: Qd2     --      [  1-]   M2: move
>>refu 22: Qe3     --      [  1-]   M2: move
>>refu 23: Qf4     Kg1     [  1-]
>>refu 24: Qg5     --      [  1-]   M2: move
>>refu 25: Qb2     --      [  1-]   M2: move
>>refu 26: Qa3     --      [  1-]   M2: move
>>refu 27: Kd2     --      [  1-]   M2: move
>>refu 28: Ke1     --      [  1-]   M2: move
>>refu 29: Kf3     --      [  1-]   M2: move
>>refu 30: Kxd1    --      [  1-]   M2: move
>>refu 31: Kf1     Ne3+    [  1-]
>>refu 32: Kd3     --      [  1-]   M2: move
>>Time (virt) = 0.000 sec
>
>Sadly, I have to confirm this fact: this is a bug in Chest.
>If I specify option "-2" to suppress the "2-mate-heuristic", it finds the
>mate in 2:
>
> Qxd1+  Kh2    Qh1#
>        Kg2    Qh1#
>
>Hence, the bug is in the "mate2" module.  Since that one is a really complex
>one, it will take some time to track it down.
>When I have found it, I will report under what circumstances it does appear.

Fortunately, I could track down this bug.

As I expected, it is in the "mate2" module, which is designed to test
candidate moves for a mate-in-2, and say either "cannot be mate-in-2, for sure"
or just "dunno, may be a candidate, go and search it".

When applied to 1.Qxd1+ this module considers the king move 1...Kh2, and
recognizes that any mate move, which moves the Q again, has to attack
the squares g1,h1,h2,g2 and h3, either by the Q or by something that is
uncovered by moving the Q away from d1.  Moving the Q to h1 lets the Q
attack all of the metioned squares except h1 itself, which is attacked by
the uncovered rook.

Unfortunately, that the rook is uncovered through _both_, the Q at its
original square c1 _and_ its destination square d1 (where the Q captures
the black knight), has not been recognized, up to now.  :-(

Thus, moving the Q e.g. up from c1 to c2 makes the effect (bug) to go away.

It is quite easy to correct this bug, and within the next week I will
provide a corrected source module.
It will be announced here, and be available through my web page.
Hopefully Dann will then provide a corrected win32 executable.
Since the circumstances for the bug to occur are not really very rare,
I'd recommend upgrading to the new version when available.

Thanks, Vincent, for providing a simplified bug report, that helped a lot!

Ok, I feel much better now :-))

Cheers,
Heiner



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.