Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: bitboard question

Author: Robert Hyatt

Date: 17:11:39 01/13/99

Go up one level in this thread


On January 13, 1999 at 17:48:18, John Coffey wrote:

>On January 13, 1999 at 16:58:05, Robert Hyatt wrote:
>
>>On January 13, 1999 at 12:52:21, John Coffey wrote:
>>
>>>
>>>>as far as 'didn't provide you with all the information you want' that might
>>>>be the result of not working with them long enough.  I haven't found a single
>>>>question I can't answer with bitboards... and many times the question is easier
>>>>to answer with them than without...  particularly in evaluation where I spend
>>>>a bunch of time...
>>>
>>>I wanted to take into account who controls the most number of squares as a
>>>part of my evaluation.  Do you think that this can be answered with bitboards?
>>>Perhaps some programs already do this?
>>>
>>>john coffey
>>
>>
>>Most any question you can answer with an offset program I can answer with
>>bitboards.  I did this early in the development of crafty, but I didn't like
>>the result, any more than I liked using "mobility" for pieces.  I found other
>>scoring terms were more effective and cheaper to compute...
>
>
>The trouble with control of squares is that you  have to take into account
>the values of the pieces that attack a square.  i.e. a pawn could control
>a square.  I had figured out that I could use bits for each type of piece
>that attacked a square, where pawns use high bits and kings use low bits.
>Add the bits for each side and the side with the highest number (more or less)
>controls the square.


there's an alternative type of bitmap you can use here... use a 16 bit short
for each square, and designate the 12 right-most bits one for each piece type/
color.  Then you can scan your regular bitmap, and build this bitmap which
for each square identifies which type of piece (or pieces) attack this square.
I don't do this, but there are lots of such ideas if/when you really need that
kind of data.  I don't use squares attacked stuff at present, other than for
move generation...



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.