Author: scott farrell
Date: 05:34:49 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 dont quite follow this one. Cant be defended by a pawn, aka backward, is the exact opposite of a passed pawn, see the following code for passed pawn. >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). > ??? >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. > I only calc if it is passed, and currently defended by a pawn, and leave the rest to the search. If defended is easy, just use the array you use for move generation of pawns moves - if it matches a pawn - it is currently defended. >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. > For passed pawn I use a simple array of masks (2 seperate arrays, one for each colour ) that is similar to the actual pawn move generator. It makes masks like this (assuming say white pawn on 4th rank or so) xxx xxx xxx x So there are 64 masks, one for each square, I & this will b.enemypawn, if it ==0, then you have a passed pawn. This seems to be fast. But I later learned fast eval for pawns is useless, when you get 99.9% hash accuracy. Backward pawns just use the opposite colour array. >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 My program only sees this through search, although I do know that crafty does this statically. Things like isolated pawns etc, I just use a mask down the files beside the current pawn. Just use ideas of pre generating array of masks, and you can achieve quite a lot. I hope some of this helps/makes sense. Scott > >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.