Author: Heiner Marxen
Date: 13:04:09 04/29/01
Go up one level in this thread
On April 29, 2001 at 06:16:09, Andrew Williams wrote: >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. My mate prover (Chest) does it that way. Back in 1989, when it was designed, we were proud for this trick to avoid the 64 bit attack sets and go along with only 32 bits, i.e. a typical RISC register at that time. >>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. One interesting and unique feature of the Chest design is, that is has both, actual attacks, and (restricted) pseudo attacks. Having both makes the calculation of pins and uncovering checks really cheap: a piece is pinned only, when the real attacks for this piece, AND-ed with the pseudo attacks (of the enemy colour) of its king are not empty. If that intersection is not empty, the pin must still be verified in some cases, but when this set is empty (most often it is) then there is no pin, for sure. Cheers, Heiner >>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.