Author: Dezhi Zhao
Date: 10:38:03 08/28/98
Go up one level in this thread
On August 28, 1998 at 05:32:01, Pauli Misikangas wrote: >Hi all! > >Here is a question for chess programmers who use bit boards in their programs. >If you'd have to implement a Shogi program (Shogi is a chess-like game with 9x9 >board, 40 pieces, and an interesting rule which allows you to drop a captured >piece back onto board as one of your own pieces), would you still use bit >boards, or prefer some other data structure? > >I'm a Shogi programmer myself (author of 'Shocky'), and my data structure is >based on huge amount of pointers pointing from pieces to squares and vice versa. >I didn't even try bit boards, because I thought that they would not be so >efficient in Shogi, because of larger board. Do you agree? I think that chess >programmers are lucky, because a chess board happens to have exactly the same >number of squares that 64-bit integer has bits, and this allows to use extremely >efficient bit operations for board handling. Do you think that this is the main >reason for the efficiency of bit boards? Would there be major problems to handle >81 bits instead of 64? > >Pauli Misikangas I met the same problem with Xiangqi (Chinese chess) with a 9x10 board. I think bitboard approach *currently* fit for a board game with no more than 64 squares. For Shogi and Xiangqi, you need 64 bit machine to implement the bitboards efficiently. Even with 64-bit m/c, you have to use 2 words to represent a bitboard just like 2x 32-bit word chess bitboard on PC. 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. When PC goes to 64 bits and a compiler begins to support int128, I will redesign my program with bitboards. Regards Dezhi Zhao
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.