Big Chess

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: Big Chess

Post by Edmund »

Don wrote:I think this would be the perfect game to program on a 256 bit computer using bit boards.
Will Taylor wrote:Hi all,

I'm interested in knowing whether it would be possible to program a decent engine to play FICGS Big Chess. The game is similar in most aspects to normal chess, with the most significant changes being a much bigger, 16x16 board, and 32 pieces for each side. I would have thought the large board would make it really difficult, but as I'm not a programmer I don't know and would be interested to hear your opinions.

Thanks,

Will

P.S. The starting setup can be seen at http://www.ficgs.com/help.html (scroll down some way).
Indeed, as the board gets bigger the bitboard approach gets more and more effective. An interesting question however would be which movegeneration to use. I suppose something like magicmove wouldn't work.
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Big Chess

Post by Greg Strong »

Edmund wrote:
Don wrote:I think this would be the perfect game to program on a 256 bit computer using bit boards.
Will Taylor wrote:Hi all,

I'm interested in knowing whether it would be possible to program a decent engine to play FICGS Big Chess. The game is similar in most aspects to normal chess, with the most significant changes being a much bigger, 16x16 board, and 32 pieces for each side. I would have thought the large board would make it really difficult, but as I'm not a programmer I don't know and would be interested to hear your opinions.

Thanks,

Will

P.S. The starting setup can be seen at http://www.ficgs.com/help.html (scroll down some way).
Indeed, as the board gets bigger the bitboard approach gets more and more effective. An interesting question however would be which movegeneration to use. I suppose something like magicmove wouldn't work.
Bitboards become more effective if the computer has operations to handle large enough values. You can, of course, perform the computation in pieces and then put the results together...

I think Kindergarten bitboard move generation is probably where it's at for this. I've figured out how to use it for wide boards (like 10x8), even though the Intel doesn't multiply 128-bit integers. You can split the board and use Kindergarten multiplication/shifting to handle the board fragment separately and combine the result easily enough. I was pretty happy when I figured that out. For this game, though, even if you have 256-bit sse-type registers, if you can only multiply by 64-bit numbers you'd have to treat the board in four pieces...
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: Big Chess

Post by jwes »

Greg Strong wrote:
Edmund wrote:
Don wrote:I think this would be the perfect game to program on a 256 bit computer using bit boards.
Will Taylor wrote:Hi all,

I'm interested in knowing whether it would be possible to program a decent engine to play FICGS Big Chess. The game is similar in most aspects to normal chess, with the most significant changes being a much bigger, 16x16 board, and 32 pieces for each side. I would have thought the large board would make it really difficult, but as I'm not a programmer I don't know and would be interested to hear your opinions.

Thanks,

Will

P.S. The starting setup can be seen at http://www.ficgs.com/help.html (scroll down some way).
Indeed, as the board gets bigger the bitboard approach gets more and more effective. An interesting question however would be which movegeneration to use. I suppose something like magicmove wouldn't work.
Bitboards become more effective if the computer has operations to handle large enough values. You can, of course, perform the computation in pieces and then put the results together...

I think Kindergarten bitboard move generation is probably where it's at for this. I've figured out how to use it for wide boards (like 10x8), even though the Intel doesn't multiply 128-bit integers. You can split the board and use Kindergarten multiplication/shifting to handle the board fragment separately and combine the result easily enough. I was pretty happy when I figured that out. For this game, though, even if you have 256-bit sse-type registers, if you can only multiply by 64-bit numbers you'd have to treat the board in four pieces...
Maybe use rotated bitmaps. Off the top of my head, the work would increase linearly with the size of the board, while multiplication would be quadratic.
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Big Chess

Post by Greg Strong »

jwes wrote:
Greg Strong wrote:
Edmund wrote:
Don wrote:I think this would be the perfect game to program on a 256 bit computer using bit boards.
Will Taylor wrote:Hi all,

I'm interested in knowing whether it would be possible to program a decent engine to play FICGS Big Chess. The game is similar in most aspects to normal chess, with the most significant changes being a much bigger, 16x16 board, and 32 pieces for each side. I would have thought the large board would make it really difficult, but as I'm not a programmer I don't know and would be interested to hear your opinions.

Thanks,

Will

P.S. The starting setup can be seen at http://www.ficgs.com/help.html (scroll down some way).
Indeed, as the board gets bigger the bitboard approach gets more and more effective. An interesting question however would be which movegeneration to use. I suppose something like magicmove wouldn't work.
Bitboards become more effective if the computer has operations to handle large enough values. You can, of course, perform the computation in pieces and then put the results together...

I think Kindergarten bitboard move generation is probably where it's at for this. I've figured out how to use it for wide boards (like 10x8), even though the Intel doesn't multiply 128-bit integers. You can split the board and use Kindergarten multiplication/shifting to handle the board fragment separately and combine the result easily enough. I was pretty happy when I figured that out. For this game, though, even if you have 256-bit sse-type registers, if you can only multiply by 64-bit numbers you'd have to treat the board in four pieces...
Maybe use rotated bitmaps. Off the top of my head, the work would increase linearly with the size of the board, while multiplication would be quadratic.
ChessV uses rotated bitboards. It has worked for me for 10x10 but the tables become exponentially larger as the board gets bigger. On a 16x16, mask a rank, exclude the edge files, and you've still got a lookup into a table of 2^14 elements. Since each is a 256-bit board (32 bytes), that's 524 megabytes per table. Times 4 different rotations is over 2 gigs. Certainly doable, but there will be a lot of cache misses slowing things down.