Computer Chess Club Archives




Subject: Rotated bitboards

Author: Peter Fendrich

Date: 13:57:00 04/22/98

There seems to be different definitions of what rotated bitboards really
are. I'm talking about rotating the diagonals.

What should be called rotated?

1) Rotate the board 45 degrees. Now we have 15 diagonals on 15 bytes.
   This would be truly rotating in my defintion. Not so good however,
   because we cant't use the 64 length bitboard to store it in.

2) Map the squares so that adjecent squares on the same diagonal
   recides on the same byte.
   This isn't really rotating, shouldn't it be called something else?

   I do this by packing the rotated bitboard. Start with a1 which is the
   only square in the first diagonal. Put it togeteher with the nearest
   diagonal with 7 squares, that is a7-g1. Next byte will be a2-b1
   concatenated with a6-f1. And so on. When looking at the square a2 one
   have to first mask away a6-f1.
   This works fine for me.

3) Are there other ways of rotating the diagonals?


This page took 0.05 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.