Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: unstoppable passers with one and

Author: Robert Hyatt

Date: 11:22:42 04/16/03

Go up one level in this thread


On April 15, 2003 at 03:47:20, Tony Werten wrote:

>On April 15, 2003 at 01:59:00, Gerd Isenberg wrote:
>
>>On April 14, 2003 at 23:37:39, Robert Hyatt wrote:
>>
>>>On April 14, 2003 at 18:09:37, Gerd Isenberg wrote:
>>>
>>>>On April 14, 2003 at 17:40:03, Robert Hyatt wrote:
>>>>
>>>>>On April 14, 2003 at 15:48:48, Gerd Isenberg wrote:
>>>>>
>>>>>>Hi all,
>>>>>>
>>>>>>a minor pawn pattern idea, i like to share ...
>>>>>>
>>>>>>With (pawn) bitboards it's pretty easy to get all passers and even to get all
>>>>>>outside passers. The second was new to me, and i had the idea recently (thinking
>>>>>>bitboards ;-), but i guess the "trick" is already common or well known.
>>>>>>
>>>>>>Instead of pattern branching after a distance compare in an inner loop over
>>>>>>passers of one color, i use a separate bitscan and reset loop over this
>>>>>>dedicated set of outside passers now, eg. in pawn endings.
>>>>>>
>>>>>>For outside passers one need a precalculated array of 2*64*2 bitboards.
>>>>>>This array is indexed by color of passed pawns we are looking for, square of
>>>>>>opposite king and color of side to move. It contains set bits for all squares
>>>>>>with distance to promotion < king distance to promote squares, considering the
>>>>>>tempo.
>>>>>>
>>>>>>Next step may be to avoid such loops at all, to process some single properties
>>>>>>without further piece interactions. Most often one uses some piece-square
>>>>>>tables, indexed by the squares of the traversed bitboard. If only the
>>>>>>rank-position is significant, a simultanious (mmx) popcount of six consecutive
>>>>>>bytes may be interesting, where the bytewise population counts are multipied
>>>>>>afterwards with some weighting factors.
>>>>>
>>>>>I do what you are close to hitting on.  I have a bitmask of 8 bits, indicating
>>>>>whether white has a passer on a file (one bitmap) or whether black has a passer
>>>>>on a file (the other bitmap).  I can now use a simple table lookup
>>>>>is_outside[256][256]
>>>>>that works just fine.  The first subscript is the white outside passers (files
>>>>>with passers)
>>>>>and the second is a bitmap of _all_ files that have black pawns (or the inverse
>>>>>for looking
>>>>>at black outside passers).
>>>>>
>>>>>A single probe says "white has an outside passer or not" and another probe says
>>>>>"black has
>>>>>an outside passer or not."  The value returned is 0, 1 or 2, which indicate how
>>>>>many outside
>>>>>passers that side has.  And when I say outside passers I mean on each wing.  0 =
>>>>>no outside
>>>>>passers, 1 = outside passer on one wing.  2 = two outside passers on opposite
>>>>>wings, which
>>>>>is almost impossible to defend against.
>>>>>
>>>>
>>>>Nice idea.
>>>>
>>>>Not sure whether my definition of _outside_ passer is correct. I mean pawns, the
>>>>enemy king can't catch anymore. Where the opposite king is outside the pawns
>>>>square. How do call them?
>>>
>>>That's not "outside".  That is "unstoppable" and the idea is commonly
>>>called "the square of the king".  It is a simple idea about whether the
>>>king can reach the promoting square quick enough to win the pawn.
>>>
>>>An "outside passer" is a passed pawn that is closest to one side of the board,
>>>where the other side of the board has pawns by both sides that may or may not
>>>be passed.  The idea is that the king must stop the outside passer and after it
>>>does, it is too far away from the other side and the pawns there go lost...
>>
>>Thanks, Bob.
>>
>>So i mentioned about "unstoppable" passers and not "outside":
>>
>>unstoppablePassers[WHITE] = passedPawns[WHITE]
>>                          & sUnstoppableSquares[WHITE][bKing][color2move];
>>
>>Anyway, your outside passer approach is great and delegates a lot of computation
>>to a precalculated table lookup. I do it in a way by computing  max
>>file-distance by looking up an 256-element table with the file bitmask of
>>passers. (zero, if only one passer exists).
>
>
>It's a little over done.  I have a byte with bits set for every file that has
>pawns (black or white ) Another 2 bytes has bits for every passed pawn. Find out
>the files of the passed pawns. What is nescessairy for a pawn to be left outside
>passed ? Well, there shouldn't be any pawns on the left side then.
>
>So, take an 8 byte array: [0,1,3,7,15,31,63,127] Take the entry of the filenr ,
>AND it with all pawns, if it's 0 then the pawn is left outside passed.
>
>Same for right (with a different array)
>
>Tony


That's a more "bitboard-like" approach, in fact.

:)

good idea...



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.