Author: Robert Hyatt
Date: 10:55:46 12/02/97
Go up one level in this thread
On December 02, 1997 at 12:46:21, Chris Whittington wrote:
>
>On December 02, 1997 at 12:32:04, Robert Hyatt wrote:
>
>>I'd also suggest changing the subject line for this thread. Crafty is
>>not remarkably fast. IE Rebel 8 is faster on equal hardware (although
>>if it could be ported to the alpha, crafty would likely be nearly 2X
>>faster).
>>
>>A better subject would be "bitmap programming" or some such...
>
>Done.
>
>One point:
>
>offsets give you all the attacks, defenders on each square already
>organised with the *size/value* of the piece in order.
>
there are other "bitmap" approaches. IE I believe "knightcap" uses
32bit maps, that use one bit for each piece that attacks a given square,
which is also pretty clever...
but my bitmaps provide the same information:
BITBOARD attackers;/* 1 bit for every square that has a piece that is
attacking the square we are interested in */
if you take this, AND with white pawns, you get *all* the white pawns
that are attacking the target. AND with white knights and you get the
knights that are attacking. Etc. I'd suspect that I can do an AND
in less time than you can extract one item for your list, because the
bitmaps stay in cache all the time, and even stick in registers during
the time they are being frequently used... So the speed advantage you
are thinking of might not be there at all...
>working out piece safety and so on is easier with offset data.
>
wait... I take bitmap data and turn it into two ordered lists of white
and black attackers so I can minimax the captures. The question is can
I produce this ordered list as quickly as you or not. I believe so, but
am not certain...
>
>bitmaps give you all the attacks/defenders, but essentially in random
>order.
not necessarily. IE you *can* get all attackers, but AND with the
appropiate piece bitmap to get just the pieces you want. And since
it takes only one cycle to do this, the cost is not high at all...
>
>bitmaps give you nicely organised piece location data, for pattern maps
>and stuff.
yes. However, at times, it gets in the way also. But this doesn't
happen
frequently enough (yet) that I'd call it any sort of problem..
>
>
>piece safety calculations are done by slower, knowledge intensive
>programs. thus bitmap design (unless you're also willing to generate
>attack tables as well) will steer the program(mer) away from this sort
>of knowledge (within the current framefork of doing things).
here I don't agree. I can do piece safety. I did it for many versions
before I chose to relegate that to the search...
>
>Enuff said :)
>
>Chris Whittington
maybe not... :)
This page took 0.01 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.