Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: about in_check()

Author: Sune Fischer

Date: 15:59:16 06/14/03

Go up one level in this thread


On June 14, 2003 at 17:23:43, Russell Reagan wrote:

>On June 14, 2003 at 17:11:11, JW de Kort wrote:
>
>>Also i'am thinking of implementing attack tables in my 0x88 program but i have
>>not found a fast approach. Ant tips?>
>
>I think the fastest way of doing attack detection in 0x88 is probably the one
>described by Bruce Moreland (http://www.brucemo.com). You can look at his open
>source program Gerbil to see a working example of how he does it. Of course
>there might be small tweaks you can do to speed it up, but that concept is the
>fastest I know of. Anytime I've tried to implement real attack tables, it's
>always been slower than the on-the-fly detection (whether 0x88, bitboards,
>16x16, whatever). YMMV.

Goes without saying if you only use it for incheck.
Incheck can be done by incrementally checking only for the moving piece and the
piece it may uncover (x-ray). No attack table can beat that.

But incheck is not the only attack you are interested in, usually.
There is also SEE, the evaluation and you can use it for extensions and pruning.

If the only alternative is to loop through the pieces or do the reverse scan
from the square and out (which is faster probably depends on the number of
pieces on the board), then I think the table will quickly become competitive.

I think if you don't have attack tables you will end up going through hoops to
avoid the expensive attack calls, just look at the grief over a simple incheck
:)

-S.



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.