Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboards !! :)

Author: Uri Blass

Date: 06:33:15 07/01/04

Go up one level in this thread


On July 01, 2004 at 08:42:38, Vincent Diepeveen wrote:

>On July 01, 2004 at 04:39:24, Gerd Isenberg 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 ?)
>>
>>Ok, bitscan traversing and psq-lookup is a even more violation IMHO ;-)
>>
>>For safe rook attacks one may look for boolean pattern/properties (depending on
>>the game state). Intersect the attack set with several small areas of the board,
>>like center, remaining extended center, squares near opposite or own king,
>>passers, squares behind passers or other movable pawns e.g. to support a
>>minority attack, squares on open/halfopen files, squares on some rook
>>trajetories to opposite king and what ever else.
>>
>>With those sets, look whether they are empty and if not, probably look whether
>>the population count is greater one.
>>
>>That may be implemented loopless and with some preconditions:
>>
>>if ( safeRookAttacks )
>>{
>>   set = safeRookAttacks & someAreaOfInterest;
>>   bunus += f1*(set!=0) + f2*((set&(set-1))!=0);
>
>2 times a 64 bits multiply AUCH. That's slow.
>
>>   ...
>>}
>>
>
>I assume Tony isn't doing such simple things as you propose here.
>
>Basically Tony might want to use some chessknowledge evaluating each square.
>
>And the reality is that scanning in bitboards is just too slow.

The reality is that humans do not think in that way so they have no idea how to
evaluate each square efficiently.

If I decide to evaluate each square after a move that I analyze and I spend 1
second for every square I will be able to calculate exactly 1 node in 64
seconds.

Uri



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.