Author: Robert Hyatt
Date: 14:50:51 08/21/04
Go up one level in this thread
On August 21, 2004 at 16:01:57, Harald Lüßen wrote: >On August 20, 2004 at 16:29:45, Robert Hyatt wrote: > >>On August 20, 2004 at 11:22:24, Tord Romstad wrote: >> >>>On August 20, 2004 at 10:59:16, Robert Hyatt wrote: >>> >[...] >>>>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. >[...] >> >>There is more to it. My "experimental version" handles the question "if the >>king is in the square, can it actually reach the queening square without having >>to deflect around a square that is attacked/occupied?" IE the case where the >>white pawn is at a5, the black king is at d5, but black has a pawn at c6. Black >>is technically "in the square" but can't get to the destination square directly. >> >>That isn't hard to handle with bitmaps. It is a pain to handle otherwise... > >Do I understand correctly that you are doing something like > >Bitboard bb = white_pawn_race[square of white pawn]; >bb &= ~black_pawn_obstacle_dependant_squares; // (a)? >bb &= ~other_black_piece_dependant_squares; // (b)? >bb &= ~some_white_piece_dependant_squares; // (Q, K) (c)? >bb &= ~white_attacks_dependant_squares; // (d)? >if (bb & BlackKing) pawn can't run. > >How do you calculate the obstacle_dependant_squares? > >Harald If the king has to move along a diagonal, there is only one direct line that has to be open. That is as far as I took it as it was the only case that was ever seen in real games when I fiddled with it. If the direct path to the queening square is not a diagonal, then there is always an alternate path through a different square. Even along a rank this works. But not along a diagonal which was the case I worked on.
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.