Author: Bruce Moreland
Date: 14:09:02 04/22/98
Go up one level in this thread
On April 22, 1998 at 16:57:00, Peter Fendrich wrote: >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? > Mapping? > > 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? The "wind from the west" board would be as follows: Bit 0 is h1, bit 1-2 is g1..h2, bit 3-5 is f1..h3, bit 6-9 is e1..h4, etc. You don't have to treat the thing as an array of bytes, if you want to get e1..h4 you can just AND the thing with 0x00000000000003C0. This fits in 64 bits and covers all the squares. This is Bob stuff. bruce
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.