Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Truly stupid bitboard question -- why rotate them?

Author: Robert Hyatt

Date: 18:19:45 03/22/99

Go up one level in this thread


On March 22, 1999 at 20:44:59, Greg Lazarou wrote:

>Do you really rotate them, or do you maintain the board in straight, 45 degree
>(diagonals), 90 degree and 135 degree angles throughout?
>
>Greg


we maintain 4 copies.  If I were building a special piece of hardware,
I'd obviously rotate as needed by simply gating the right source bits to
the right destination bits (this is a straight-forward 1-1 mapping process
and would be an 'instant' hardware operation.)




>
>On March 22, 1999 at 18:29:07, James Robertson wrote:
>
>>On March 22, 1999 at 17:06:44, Dann Corbit wrote:
>>
>>>I understand that you can represent a chess board as a rotated bit sets.  But my
>>>significantly stupid question is "Why rotate them -- what is the advantage?"
>>
>>To generate moves, you extract 8 adjacent bits from your 64-bit bitboard. This
>>works great for rank moves since they are already perfectly lined up. But if you
>>want to get file moves, you can't extract every 8th bit, and diagonal moves are
>>even worse. If you rotate the bitboard, you can extract file and diagonal moves.
>>
>>James



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.