Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: What is the Attaks_From[64] table used to in Crafty ?

Author: Mathieu Pagé

Date: 11:41:09 11/09/04

Go up one level in this thread


On November 09, 2004 at 14:30:12, Robert Hyatt wrote:

>On November 09, 2004 at 14:15:19, Mathieu Pagé wrote:
>
>>Hi, the subject explain it all, I thought that it was used to generate moves,
>>but I see that it is not the case as in this example comming from crafty's
>>MOVGEN.C, The function AttacksQueen(from) is used insted of Attaks_from[from]:
>>
>>/*
>> ----------------------------------------------------------
>>|                                                          |
>>|   now, produce queen moves by cycling through the        |
>>|   *_queen board to locate a [from] square and then       |
>>|   generate the AttacksFrom() bitmap which supplies the   |
>>|   list of valid <to> squares.                            |
>>|                                                          |
>> ----------------------------------------------------------
>>*/
>>    piecebd=WhiteQueens;
>>    while (piecebd) {
>>      from=LastOne(piecebd);
>>      moves=AttacksQueen(from) & BlackPieces;
>>      temp=from+(queen<<12);
>>      while (moves) {
>>        to=LastOne(moves);
>>        *move++=temp|(to<<6)|((-PcOnSq(to))<<15);
>>        Clear(to,moves);
>>      }
>>      Clear(from,piecebd);
>>    }
>>
>>So what is attaks_from used for ?
>>
>>Mathieu Pagé
>
>
>Where do you see any "attaks_from" (or even attacks_from) in Crafty's source?
>
>AttacksQueen() has to do four things.  It has to take each diagonal separately
>and look up the attacks along that diagonal based on the rotated bitmap stuff.
>Ditto for ranks/files.
>
>But maybe I am misunderstanding your question above?

Hi Robert,

I'm sorry, I did read your paper on rotated BitBoard (on your web site) and I
deduce (wrongly) that it was implemented like that in crafty.

So you answered my question,

Thanks.

Mathieu Pagé



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.