Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question for Hyatt about Alpha/Beta

Author: Vasik Rajlich

Date: 07:54:23 02/06/04

Go up one level in this thread


On February 06, 2004 at 10:29:09, Tord Romstad wrote:

>On February 06, 2004 at 10:16:47, Sune Fischer wrote:
>
>>On February 06, 2004 at 09:54:55, Tord Romstad wrote:
>>
>>>On February 06, 2004 at 09:08:28, Anthony Cozzie wrote:
>>>
>>>>On February 06, 2004 at 07:22:19, Tord Romstad wrote:
>>>>
>>>>>It is much more expensive than that.  Remember that all squares are not
>>>>>equally important, and that the bishop cannot safely move to all the squares
>>>>>you attack.  For each square the bishop attacks, you must see if it can
>>>>>move there without getting captured, and consider how useful it is to be
>>>>>able to move to this square.  For each friendly pawn which obstructs the
>>>>>bishop, you must consider how easy it is to advance this pawn.  Most of
>>>>>this is quite expensive to compute, and I have been forced to do some
>>>>>dubious shortcuts and approximations in order not to slow my engine down
>>>>>too much.  Some day I should probably have a look at how Bob does this,
>>>>>and see if there are some ideas there which I could use.
>>>>>
>>>>
>>>>
>>>>With rotated bitboards it is practically free; it is just a popcount8.
>>>>
>>>>Basically just popcount your index.
>>>
>>>I don't see how you can do this with just a popcount.  First of all, how
>>>do you get a bitboard containing all the squares the bishop can *safely*
>>>reach?
>>
>>You can mask out bad squares before you popcount, that's what I do currently.
>
>OK, but what I really want to know is how you find these bad squares
>quickly.
>
>>>Assuming that you can calculate such a bitboard quickly, how
>>>do you use it to calculate the bishop's mobility?  A raw popcount is
>>>obviously not enough, because all squares are not equally valuable.
>>
>>It's not so easy to figure out what the squares are worth.
>
>You're right.  This is one of the reasons that good mobility is difficult
>and (at least for non-bitboarders like me) expensive to do.
>
>>Although an SME says you can't safely move there it might still be worth
>>something to attack it.
>
>What's an SME?  I agree that it's often worth something to attack a square
>even if you cannot move there safely, but as I wrote elsewhere in the thread
>this is reflected in other parts of the eval (space, mobility for the
>opponent, pressure against opponent's king, etc.)
>
>>>And finally, you still have to look closely at all the blockers to
>>>determine their importance.
>>>
>>>I am not claiming that you are wrong, of course -- I am just curious
>>>about how this is done with bitboards.
>>
>>You can easily mask out all the blocked pawns before you popcount, no problem.
>
>Yes, but not all blocked pawns are equal.  Sometimes the pawn is easily
>"unblocked", other times the blocker is almost impossible to remove.
>
>Even though I have not yet given bitboards a try (I will some day), I
>often try to think about how I would solve some specific evaluation
>problem by using bitboards.  Usually I find it tremendously difficult,
>and this is quite often because bitboards do not distinguish between
>different shades of gray.  Each square has either a 1 or a 0, there
>are no possible values in between.  I don't want to know just whether
>a pawn is blocked or not; I want a measure of how difficult it is to
>remove the blocker.
>
>Tord

You can usually create some sort of individual bitboards to speed the
calculations up. For example, for each square on the board, you could store the
mask containing white pawns which could potentially attack that square (and
break the blockade). Doing (mask of pawn squares) & (white pawns) could tell you
if the black piece is safe from a white pawn.

Vas



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.