Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: how to detect information about pawn structure based on bitboard

Author: Robert Hyatt

Date: 06:19:19 12/17/02

Go up one level in this thread


On December 17, 2002 at 03:40:11, Uri Blass wrote:

>I think to add to my program bitboard that will be used only for pawn structure.
>
>2 numbers of 64 bits that are used for white pawns and for black pawns.
>
>I want to detect based on these bitboards a lot of information about every pawn
>and I may want to use the information together with attack tables for
>evaluation.
>
>My question is if using bitboard is a good idea to get the information and
>if the answer is positive how can I detect the information by bitboards
>
>For every pawn I want to detect the following:
>
>1)Is it a weak pawn(a pawn that can never be defended by a pawn and cannot go
>forward to promote without captures and without the risk of being captured by a
>pawn)


I do this by computing a bitmap that shows every square a pawn can reach,
safely, in the current position.  Then you can use that to answer the question
"is the pawn currently defended or can it be defended by a pawn?

If it isn't or can't be defended, then you can use the actual bitmap to see
whether the pawn can safely advance and be liquidated or not, ie if it moves
one square forward is it attacked by more pawns than it is defended by?  This
will catch backward pawns.

Isolated pawns are trivial.




>2)Is it probably weak pawn(it means that the only way to defend it by a pawn is
>by capturing the opponent pawn or by letting the opponent to capture the
>potential defender by a pawn).

That should be uncovered in the first step above...


>
>3)Is it a pawn that is defended by a pawn and if not how many normal pawn moves
>that are not captures and do not let the opponent to capture by a pawn are
>needed to defend it by a pawn.



ditto...

>
>4)Is it a passed pawn and if it is a passed pawn how many normal pawn moves are
>needed to defend it by a pawn.
>


passed status takes one AND operation to see if the adjacent files and the file
in front of the pawn are empty beyond the pawn in question.  For the weak part,
the first step again does this.



>5)Is it a potential passed pawn(is the only way of the opponent to stop it is by
>letting the player to have another passed pawn)
>In case that it is a potential passed pawn the question is if it can be done by
>normal means or the only way to make it a passed pawn is by sacrifices
>
>Uri

See above.  If the pawn can advance, and is on a half-open file, you can tell
if it is passed after the advance/trades...

So far as I know, I do everything above in Crafty already.




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.