Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Attack Table Question

Author: Andrew Williams

Date: 00:17:12 03/23/04

Go up one level in this thread


On March 22, 2004 at 18:50:15, Dieter Buerssner wrote:

>On March 22, 2004 at 18:16:37, martin fierz wrote:
>
>>of course i would also like to make an incremental update of that table, but i
>>decided against such an attempt because i couldn't figure out how to do it - or
>>rather, i devised a scheme for incremental updating which was so horribly
>>complicated that i decided not to use it - i'd rather have a slow engine with
>>little bugs and good maintainability than a fast engine with many bugs and low
>>maintainability :-)
>
>Reminds me of:
>
>"Debugging is twice as hard as writing the code in the first place. Therefore,
>if you write the code as cleverly as possible, you are, by definition, not smart
>enough to debug it." Brian W. Kernighan
>
>At the moment, I don't use attack tables at all. But I want them again. And I
>also only have a "build-from-scratch" routine. I also thought about incremental
>updates, and it seems like a very hard job. And the bad thing is, they seem to
>be especially useful at the leafs or close to the leafs. Perhaps I will start
>again with using them only closer to the root, for pruning/extension decisions.
>
>Regards,
>Dieter

I have incrementally updated (32-bit) attackboards. It was a horrible job, in
fact SO horrible that I stopped before the final optimization step. At the
moment, I have a loop which iterates over the whole board to mask out the
attacks of the moving piece, the captured piece plus any piece attacking the
movning piece, plus any piece attacking the captured piece. Then I generate the
attacks of the moved piece plus the other "affected" pieces. Of course, I could
use direction-dependent loops to improve this somewhat; this is something I
intend to test one day, and with a working implementation it shouldn't be too
painful to do.

Dann's idea of comparing the incrementally updated attacks board with the one
generated from scratch is a good one of course. This was invaluable in
debugging.

Andrew



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.