Bitboards Little Helper 3: shifts, rotations, bitcount, Mac

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Bitboards Little Helper 3: shifts, rotations, bitcount, Mac

Post by JuLieN »

There it is, the third release of this little tool growing usable. Hopefully it will please you enough so I can go back to actually programming a chess engine! :lol:

Here's the readme with the changes :
Readme:
-------

Bitboards' Little Helper is a small tool designed to help chess engines programmers with bitboards.

You can:
- edit each individual bit of the board
- edit a whole rank or column (by clicking its number or letter)
- clear/set/invert the whole board
- copy a bitboard into another one (hence using a bitboard as a backup of the other one)
- execute and, and not, or, and xor boolean operations between the two first bitboards
- do a shift left or shift right operation
- do various rotations of the bitboards
- edit, copy and paste from/to the conversion textfields

The corresponding value in binary, hexadecimal and decimal notations is updated in real time.

This tool is free of charge and may be freely distributed, providing you keep this readme file intact and in the archive.

Feel free to contact me for any suggestion of improvement at jul_marcel at hotmail dot com.

/Julien MARCEL


History:
--------
2011-05-14 : third version
Changes:
- added shift left and shift right operations
- added rotation by 90, 180 and 270 degrees
- added bits count
- fixed a bug in the "copy bb1 to bb2" operation

2011-05-12 : Second version
Changes:
- added two bitboards, for a total of 3, the 3rd one displaying the results of operations on the other ones
- added boolean operations : and, and not, or, xor
- the conversion labels have been replaced with textfields that you can edit and copy/paste from/to
- added two more "modes" for the lsb/msb orientation of your bitboards
- slightly changed the name
2011-05-11 : First version
Here's a screenshot of the Windows version :
Image

And one of the MacOSX version :
Image

Download :
Windows version : http://julien.marcel.free.fr/public/BLH2_win.rar
Mac OSX version : http://julien.marcel.free.fr/public/BLH2_Mac.zip


And a few answers to your comments:
casey wrote:Too late to me. I have wished to have a similar tool when I have started. Now I have integrated so many functions to my prog to examine bits.

BTW, I think it will be more useful if you add some more manipulate functions such as ones to rotate 90, 180, count number of bit, shift left, shift right...
Done! :)
sluijten wrote:Great tool! Can you add multiplication (to visualize how magics work)?
Hmm, after what Gerd said, I prefer to pass :
JuLieN wrote:
Gerd Isenberg wrote:
sluijten wrote:Great tool! Can you add multiplication (to visualize how magics work)?
It is interesting to multiply ranks or diagonals (or their subsets) with the lowest file 0x0101010101010101. Unlike this fill-north kindergarten multiplication, magic bitboards in general have no fixed one-to-one mapping of occupied bits to the upper result bits of the product while varying the occupancy - due to "random" intermediate overflows, which makes it hard to visualize how magic bitboards work.
Well, then I can see no practical way to integrate all this into a general tool while keeping the interface simple, so I'll pass on multiplications until I figure out an elegant way to do it, sorry. :?
Hope you guys will find this tool useful. :)
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]