Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Best use of attack tables

Author: Miguel A. Ballicora

Date: 20:57:10 04/27/01

Go up one level in this thread


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

This is what I do in Gaviota, which by no means is guarantee of anything.

>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 do two pawn attack tables, left and right attack. I compute the addition
of both (OR) on the fly.

>What is the typical savings of attack tables compared to performing the
>computations on the fly?

In my case, I believe that it is irrelevant because it is not a bottleneck at
all (the pawn tables, Q B and R are very expensive).

>Is there any advantage to trying to compress the attack tables?

The advantage would be handling 32 bits variables rather than 64, which kills
me, but I have the feeling that the computation could be more expensive.

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

I use it in several ways. I kept them individually so I use them to generate the
moves, and calculate mobility. I use them blended too, for instance, to find
"bad squares" for rooks for instance. (i.e. I generate on the fly B+N
attacktables).

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

You mean in SEE?
I use them in generation and in all phases of evaluation. For that reason,
I update them in makemove. That makes my program very slow. I still
have to optimize this.

>
>Obviously, knight attack tables can be performed with a single & operation, but

you mean OR'ed? adding all knights attacks in one bitboard?

>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?

I calculate them with using rotated bitboards.

>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.

When I started my program, I use them to generate statically legal moves.
without the necessity to try them with makemove. In other words, my generator
gave the list of legal moves and nothing else.  I enjoyed doing it but... How
silly! I thought it was a smart thing to do but it was slow as hell!
I only use it now for check evasion.
It is useful because I can say right away whether I have to extend because there
is only one reply (i did not implement it yet) or is a checkmate.

Basically I used them for everything.

Regards,
Miguel



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.