Computer Chess Club Archives


Search

Terms

Messages

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

Author: James Robertson

Date: 15:29:07 03/22/99

Go up one level in this thread


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.