Author: Robert Hyatt
Date: 07:31:30 06/06/04
Go up one level in this thread
On June 06, 2004 at 09:23:10, Gopikrishna wrote:
>In the following code,
>
>piecebd=WhiteQueens;
> while (piecebd) {
> from=LastOne(piecebd);
> moves=AttacksQueen(from);
> temp=from+(queen<<12);
> while (moves) {
> to=LastOne(moves);
> move_list[i++]=temp+to<<6;
> Clear(to,moves);
> }
> Clear(from,piecebd);
> }
>
>We are generating moves that queen attacks from the "from" square.But later we
>are calculating some temp and then later adding it with "to" to create move
>list.Why are we doing this? Also I dont follow why we are doing queen<<12 and
>to<<6.The code is in http://www.cis.uab.edu/info/faculty/hyatt/bitmaps.html
>Thanks.
My internal move format is 21 bits. 6bits for <from> (a constant in the above
loop) 6bits for <to> (a variable above), 3 bits for <moving piece> (a constant
above), 3 bits for <captured piece> (a variable above) and 3 bits for
<promote-to> (a constant of 0 except for pawn moves only).
temp = from which is a constant, plus "queen" which is a constant and is the
kind of piece for the loop above.
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.