Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboards !! :)

Author: Tony Werten

Date: 12:44:42 07/01/04

Go up one level in this thread


On July 01, 2004 at 11:13:14, Robert Hyatt wrote:

>On July 01, 2004 at 02:50:35, Tony Werten wrote:
>
>>Hi all,
>>
>>although I like the principle of bitboards, it really bothers me that I can't
>>seem to find a decent/fast way to evaluate weighted safe squares.
>>
>>Suppose I want to (simple) evaluate a rook, I generate a bitboard with all
>>reachable squares and mask off the squares attacked by lower pieces (that's no
>>problem).
>>
>>(This doesn't exacly generate safe squares, only the ones that aren't attacked
>>at all by opponents pieces are, for the remaining squares one would need a SEE,
>>but that's not the point )
>>
>>Now I can use this bitboard ( say rook on e4 ), mask the rank state, and look in
>>a precomputed table how this rankstate scores on an e rank. No problem.
>>
>>But how to do the files ? If I use the rotated board, I need to have the
>>opponents attackboard in this rotated board as well, wich would be very costly
>>to compute (ie also for the bishops,queens ) and very complicated.
>>
>>Any ideas ? Am I missing something ?
>>
>>BTW, doing a popcount isn't a solution, since it violates the elegance of
>>bitboards ( and is slow ?)
>>
>>Tony
>
>
>On the Cray there is an elegant solution, but not on X86 so far...
>
>You can create a 64-word vector of "weights".  How you compute these is up to
>you.  In Cray Blitz I did this as I did the evaluation, figuring out which
>squares were weak, unimportant, strong, useful, painful for opponent, etc.
>After the normal eval, I had a vector of values, one per square for all squares
>on the board.  Now I computed the "attack bitmap" for a piece, and stuck that in
>the vector mask register.  Now when I sum up the square value vector, it only
>sums the values with a corresponding bit mask of 1, meaning this piece attacks
>that square safely.

That was actually what I was looking for, to do something like that. Couldn't
think of a good way to do that. Now I know why.

>
>I obviously don't do that at present, since X86 has no such direct capability
>and the software approach is expensive...

Yes, almost as expensive as a Cray :)

Tony

>
>In any case, I believe there are plenty of viable alternatives to this kind of
>mobility concept that it isn't that important...  IE mobility has many forms of
>expression.  A rook on an open file is one such idea...



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.