Wiki appeal and question to Bob

Discussion of chess software programming and technical issues.

Moderator: Ras

Gerd Isenberg
Posts: 2251
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Wiki appeal and question to Bob

Post by Gerd Isenberg »

Hi Bob,

I wrote some stuff about rotated bitboards http://chessprogramming.wikispaces.com/ ... +Bitboards
Is it OK, to quote an old interesting post of your's from rec.games.chess.computer archives about the square mapping of the diagonals?

To all others, eventually interested - feel free to enter the chess programming wiki, to add your own stuff and also to correct or discuss the stuff I added about bitboards. Further suggestions and critique appreciated.

Thanks,
Gerd
Pradu
Posts: 287
Joined: Sat Mar 11, 2006 3:19 am
Location: Atlanta, GA

Re: Wiki appeal and question to Bob

Post by Pradu »

Gerd Isenberg wrote:Hi Bob,

I wrote some stuff about rotated bitboards http://chessprogramming.wikispaces.com/ ... +Bitboards
Is it OK, to quote an old interesting post of your's from rec.games.chess.computer archives about the square mapping of the diagonals?

To all others, eventually interested - feel free to enter the chess programming wiki, to add your own stuff and also to correct or discuss the stuff I added about bitboards. Further suggestions and critique appreciated.

Thanks,
Gerd
It should be ok to quote by "fair use". However it would be nice to link to the post in rec.games.chess.computer archives if possible. This wiki is already becoming a great source of computer chess knowledge, atleast in the bitboards section thanks to you. 8-)
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Wiki appeal and question to Bob

Post by bob »

Gerd Isenberg wrote:Hi Bob,

I wrote some stuff about rotated bitboards http://chessprogramming.wikispaces.com/ ... +Bitboards
Is it OK, to quote an old interesting post of your's from rec.games.chess.computer archives about the square mapping of the diagonals?

To all others, eventually interested - feel free to enter the chess programming wiki, to add your own stuff and also to correct or discuss the stuff I added about bitboards. Further suggestions and critique appreciated.

Thanks,
Gerd
Of course it's OK. :)

Although it is a bit out of date since rotated bitboards have been pretty well replaced by magic bitboards instead...
Uri Blass
Posts: 10790
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Wiki appeal and question to Bob

Post by Uri Blass »

bob wrote:
Gerd Isenberg wrote:Hi Bob,

I wrote some stuff about rotated bitboards http://chessprogramming.wikispaces.com/ ... +Bitboards
Is it OK, to quote an old interesting post of your's from rec.games.chess.computer archives about the square mapping of the diagonals?

To all others, eventually interested - feel free to enter the chess programming wiki, to add your own stuff and also to correct or discuss the stuff I added about bitboards. Further suggestions and critique appreciated.

Thanks,
Gerd
Of course it's OK. :)

Although it is a bit out of date since rotated bitboards have been pretty well replaced by magic bitboards instead...
Strelka is using rotated bitboard so I guess that the same is for rybka.
Is there a proof that magic bitboards is superior relative to rotated bitboard?

Uri
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Wiki appeal and question to Bob

Post by bob »

Uri Blass wrote:
bob wrote:
Gerd Isenberg wrote:Hi Bob,

I wrote some stuff about rotated bitboards http://chessprogramming.wikispaces.com/ ... +Bitboards
Is it OK, to quote an old interesting post of your's from rec.games.chess.computer archives about the square mapping of the diagonals?

To all others, eventually interested - feel free to enter the chess programming wiki, to add your own stuff and also to correct or discuss the stuff I added about bitboards. Further suggestions and critique appreciated.

Thanks,
Gerd
Of course it's OK. :)

Although it is a bit out of date since rotated bitboards have been pretty well replaced by magic bitboards instead...
Strelka is using rotated bitboard so I guess that the same is for rybka.
Is there a proof that magic bitboards is superior relative to rotated bitboard?

Uri
Depends on your definition of "superior".

Speed for me was identical. So no advantage there. It did simplify Make/Unmake since I no longer need the rotated occupied squares bitboards, so that was a plus. But the main advantage is the simplicity it gives when you want to remove a piece and then generate new sliding attacks. With rotated bitboards, it took a lot of work to remove the piece from all 4 occupied-square bitboards, with magic this is not necessary.
Gerd Isenberg
Posts: 2251
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Wiki appeal and question to Bob

Post by Gerd Isenberg »

Pradu wrote:It should be ok to quote by "fair use". However it would be nice to link to the post in rec.games.chess.computer archives if possible. This wiki is already becoming a great source of computer chess knowledge, atleast in the bitboards section thanks to you. 8-)
Thanks Pradu, the wiki is much fun. The link I used via gougle-group search looks a bit dubious or temporary - can somebody provide a better one?

http://groups.google.de/group/rec.games.chess.computer/
browse_thread/thread/13e6c504ace86/082871d4e10a0841?
lnk=st&q=rotated+bitmaps&rnum=13&hl=de#082871d4e10a0841
Gerd Isenberg
Posts: 2251
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Wiki appeal and question to Bob

Post by Gerd Isenberg »

bob wrote: Of course it's OK. :)

Although it is a bit out of date since rotated bitboards have been pretty well replaced by magic bitboards instead...
OK, thanks. I think this is still quite interesting stuff and I am keen in some history issues about rotated bitboards - still searching the "oldest" post of rotated. I guess a lot of stuff was discussed in private communication.
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Wiki appeal and question to Bob

Post by Tord Romstad »

bob wrote:Although it is a bit out of date since rotated bitboards have been pretty well replaced by magic bitboards instead...
I don't agree. Rotated bitboards are much more versatile than magic bitboards, and I expect them to be more popular for a long time, unless some major breakthroughs are found in the magic techiques. Currently, magic bitboard are not really very suitable for board sizes bigger than 8x8 (because 128-bit arithmetic is expensive, and the table sizes end up being too big), and they are also problematic on handheld computers (because of limited memory).

Tord
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: Wiki appeal and question to Bob

Post by Zach Wegner »

Tord Romstad wrote:I don't agree. Rotated bitboards are much more versatile than magic bitboards, and I expect them to be more popular for a long time, unless some major breakthroughs are found in the magic techiques. Currently, magic bitboard are not really very suitable for board sizes bigger than 8x8 (because 128-bit arithmetic is expensive, and the table sizes end up being too big), and they are also problematic on handheld computers (because of limited memory).

Tord
Hello Tord,

Well, I would say that rotated bitboards are obsolete. I think magic is one of the things against them, but the numerous nonrotated bitboard techniques have the versatility and the low(er) memory footprint associated with rotated. I would bet the techniques used there could be translated to 10x8 and possibly other sizes. One problem that all lookup schemes have there is the rank attacks, which need to be bigger. One effect of this is that you can no longer have a table such as attack_table[square][direction][bits], unless you want to store 8 bits for all 4 directions.

Zach
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: Wiki appeal and question to Bob

Post by Aleks Peshkov »

Digging into CCC I found a very interesting bitboard layout:
Efficient Bitboard Implementation on 32-bit Architecture
Of course 9 years later 32-bit microoptimization is not a hot theme, but it gives me a direction to think about improving currently known bitboard magic and nonmagic techniques. At least it is worse a short word in wiki's history pages.