How do I model a chessboard when programming a computer to play chess?

后端 未结 14 2312
夕颜
夕颜 2021-01-31 10:13

What data structures would you use to represent a chessboard for a computer chess program?

14条回答
  •  梦谈多话
    2021-01-31 10:26

    Well, not sure if this helps, but Deep Blue used a single 6-bit number to represent a specific position on the board. This helped it save footprint on-chip in comparison to it's competitor, which used a 64-bit bitboard.

    This might not be relevant, since chances are, you might have 64 bit registers on your target hardware, already.

提交回复
热议问题