Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Best use of attack tables

Author: Andrew Williams

Date: 03:16:09 04/29/01

Go up one level in this thread


On April 27, 2001 at 21:28:14, Dann Corbit wrote:

Hi Dann,

>Precomputing attack tables is a snap, of course.  The burning question is, how
>are they best utilized?
>
>I notice that nobody makes pawn attack tables.  Is that because pawn attacks are
>too trivial to compute on the fly?

I have an array called attacks. Each element is a 32-bit unsigned int.
Each bit of an element represents one piece (or pawn) on the board (16 white,
16 black). A bit is set if that piece or pawn attacks that square. This array
is kept up to date in the makemove function.

>
>What is the typical savings of attack tables compared to performing the
>computations on the fly?
>
>Is there any advantage to trying to compress the attack tables?
>

Never considered this.

>Do you use attack tables against an entire side at once, or only against pieces
>by set or even individual chess men?
>

In my evaluation they are mostly used in assessing attacks around the king,
and for control of the centre.

>Are they used in MVV/LVA primarily, or during all phases of evaluation?
>

I use them for move capture generation and for SEE calculations.

>Obviously, knight attack tables can be performed with a single & operation, but
>what do you do with bishops, queens, etc, where your own man or an intervening
>piece can get in the way?  Are they used only as a pre-test to see if the rest
>is worth calculating?
>

Mine are actual attacks, not pseudo attacks. After I'd implemented my attacks
stuff, I wished I'd done pseudo attacks first so that I could have had something
to compare.

>I thought of using all your own men, &'ed together as a mask, and then clearing
>everything past a "pierce" mark, but that would probably be as expensive as
>computation of the attack.

Cheers


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.