Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: WAC is still useful (puzzle answer)

Author: GeoffW

Date: 02:42:40 02/19/05

Go up one level in this thread


Hi

Uri was pretty much spot on.

I was rewriting my incheck() function from the original method radiating 8 rays
from the king, to a version that looks at the move and works out if it creates a
direct check or a discovered check.

The discovered check code looked at the from square to see if it discovers a
check. The unique thing about an en passant move is that you also need to look
at the captured pawn square, to see if that has also discovered a check.
I bet a few programs might have missed that little bit of logic.

If I remember correctly it was a bit of advice from Bob from a while back that
spotted the bug. Namely, always have lots of verification code to validate
changes. I left the original check function in and compared the results of the
two functions for all nodes. It was quite a few million nodes before the error
detect got triggered

        Geoff



On February 18, 2005 at 10:45:00, GeoffW wrote:

>Hi
>
>WAC might not be any challenge to the Crafties of this world but I find it still
>really useful for testing.  Just after reading Dan's post below I had been
>testing a re-writen a section of my code. I was convinced it was OK and bug free
>till I ran WAC at 1 sec per position. The good variety of positions and the
>speedy time per position soon showed up my bug.
>
>Easy test, but can you guess what I had been rewriting and what I had overlooked
>from the position below ?  (9 or so ply down into WAC 115)
>
>[D]5k2/6pp/8/q7/pP5P/P5P1/5P2/4K3 b - b3 0 1
>
>  Geoff



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.