Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: attacking bitboards?

Author: Robert Hyatt

Date: 15:36:08 10/19/99

Go up one level in this thread


On October 19, 1999 at 18:19:41, Daniel Clausen wrote:

>Hi
>
>On October 19, 1999 at 11:23:30, Robert Hyatt wrote:
>
>>On October 19, 1999 at 07:45:33, Antonio Dieguez wrote:
>>
>>>I have read somewhere "atacking bitboards"
>>>What are exactly them? it has for example the data about all squares atacked by
>>>white and black? but how are they updated? it looks very complicated.
>>>
>>>
>>>me.
>>
>>
>>It is somewhat complicated, but doesn't have to be computationally expensive.
>>IE for non-sliding pieces, you can simply look up in a table to find which
>>squares a piece on "SQ" attacks.  For sliding pieces it is more complicated,
>>but rotated bitmaps turns this into a series of table lookups as well..
>
>I'm using bitboards in my chess engine and I'm concentrating on the eval
>for once. [:)] I noticed that as long as I can't answer questions like
>"is square XY attacked by the opponent" and things like dat, then my eval
>tends to be too static, ie it plays the same moves in all games. (more or
>less :)
>
>Ideally I would have a bitboard attacks[64], which shows has all the pieces
>attacking a certain square. If I don't have that, I basically have to
>make a testCheckForSquare(XY).
>
>So I'd like to implement these attacks[64] bitboard, but they prolly should
>be updates incrementally after each move. :) Do you think this is possible
>in a reasonable amount of time? I thought about that for some time, but every
>time I do this my head hurts after 10 mins because it seems rather complex.
>So, the question to all bitboard hackers is: do you think this is a good
>idea? :)
>
>Kind regards,
> -sargon


Yes, you can compute them.  Early versions of crafty (prior to rotated bitmaps)
did this.  I found that the cost was more than the benefit however, and don't
keep them any longer...  but I do use that same sort of information, in (say)
Swap(), but I just compute it as needed...

You should try it both ways, as programs are different...



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.