Author: Robert Hyatt
Date: 15:06:49 08/28/98
Go up one level in this thread
On August 28, 1998 at 16:50:31, David Eppstein wrote: >On August 28, 1998 at 13:38:03, Dezhi Zhao wrote: >>Neither 9x9 nor 9x10 is of power of 2. So a mask must be used to mask off >>the unused bits after each shift operation or before any logical tests. >>In any case you cannot get the same efficiency as chess programmers. > >I think this power of two thing is a red herring. Even for an 8x8 board you have >to mask so your pieces don't think they can wrap around from one side of the >board to the other. You really don't have to do this... IE I have *no* such masks in Crafty. I simply pre-compute attack rays that don't need such checks, because in the actual engine I *never* loop down a diagonal, rank or file. It is done differently than a normal offset-type program, and by doing it correctly, there is never a need to worry about "wrapping" because it simply doesn't come up. > >My program is for a game with a 5x9 board and bitboards work just fine for it. >(In fact, because 5x9 is <em>not</em> a power of two, I get some extra slack: I >use a 6x10 subarray of bits to represent the board, where one row and column are >always empty, allowing me to not have to mask so much, and I still have six bits >extra to use as flags.) > >I get the impression (not having played it) that Shogi suffers from the same >problem as chess wrt bitboards though: lots of different kinds of pieces and >special rules such as castling and en-passant. Bitboards really shine in games >where all or most pieces are the same and the rules are more uniform (e.g. >checkers).
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.