Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: It seems to me more logical instead of firstone and lastone to use

Author: Robert Hyatt

Date: 09:00:03 01/26/03

Go up one level in this thread


On January 26, 2003 at 11:55:27, Antonio Dieguez wrote:

>On January 26, 2003 at 10:34:51, Robert Hyatt wrote:
>
>>Fen starts from the last rank because, by standard, chess boards are displayed
>>with white on the bottom.  It is more natural to read left to right, top to
>>bottom, which means a8-h8, a7-h7, ..., a1-h1
>>
>>It was done for simplicity and nothing else.
>
>Hi, still, I don't know if you don't loop too much, with your magical bitboards,
>but with other repr one would like to increment the position when moving forward
>with white so it has its simplicity there.

you can still do that.  Just let the LSB = a1, rather than the MSB.  Then you
can use native BSR/BSF instructions that will return the right number...  Or
the LSB could be h1 and go up from there if you want to be able to "visualize"
things a bit easier.

In Crafty, I have symbolically named each bit with a typedef, so changing this
is not all _that_ hard, and I am probably going to do it one day before long
simply to make BSF/BSR more useful.




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.