Author: Robert Hyatt
Date: 07:59:16 08/20/04
Go up one level in this thread
On August 20, 2004 at 05:05:19, Tord Romstad wrote: >On August 20, 2004 at 00:37:26, Eric Oldre wrote: > >>On August 19, 2004 at 18:46:32, Robert Hyatt wrote: >>> >>> >>>Has to do with passed pawns and no pieces on the board. If you form a square >>>with one side going from the pawn to its promotion square, if the king is inside >>>that square, the pawn can't run and promote. If the king is outside that square >>>then the pawn promotes and wins. Simple idea with a few wrinkles to deal with. >> >>Thanks Robert, >>that is actuall something I know i've read about at some point on this board. >>and it's something that i hope i'll get to at some point. >> >>wouldn't you need to have 2 different bit boards? depending on who's turn it is >>to move? > >You don't need even a single bitboard. Just compare the distance of the >passed pawn to the promotion square to the distance of the defending king >to the promotion square. Subtract 1 from the defending king's distance >if it is the defender's turn to move. > >Tord > Bitboards don't need any subtraction, any correction for side to move, nor even the exact king square. It looks something like this: if (white_pawn_race[square of white pawn] & BlackKing) pawn can't run. >> >>Eric
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.