Free Bitboard Viewing Utility...

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Free Bitboard Viewing Utility...

Post by Steve Maughan »

It's difficult to imagine developing a bitboard chess engine without the ability to view a bitboard as a chess board (and vice-verse). So I created a little bitboard viewing application

More here: Chess Bitboard Viewer

It's really nothing special, but it may be useful to others,

Steve
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Free Bitboard Viewing Utility...

Post by tpetzke »

Hi Steve,

Julien had the same idea some time ago

http://www.chess2u.com/t2159-new-free-t ... rds-helper

Thomas...
mar
Posts: 2555
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Free Bitboard Viewing Utility...

Post by mar »

Gerd Isenberg got the same idea too :)
http://chessprogramming.wikispaces.com/Bibob
I would like to be able to have the option for flipping bitboard representation (A1 = bit 0 or A8 = bit 0), so far none of the tools seems able to do that.
(I use somewhat nonstandard A8 = bit 0, H1 = bit 63 :)
Ah sorry, Julien's tool can do that :)
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Free Bitboard Viewing Utility...

Post by Gerd Isenberg »

mar wrote:Gerd Isenberg got the same idea too :)
http://chessprogramming.wikispaces.com/Bibob
I would like to be able to have the option for flipping bitboard representation (A1 = bit 0 or A8 = bit 0), so far none of the tools seems able to do that.
(I use somewhat nonstandard A8 = bit 0, H1 = bit 63 :)
Ah sorry, Julien's tool can do that :)
Ok, next weekend or so I will add some modes for all orthogonal mappings, as well as unary flip- and mirror operators...
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Free Bitboard Viewing Utility...

Post by Gerd Isenberg »

mar wrote:Gerd Isenberg got the same idea too :)
http://chessprogramming.wikispaces.com/Bibob
I would like to be able to have the option for flipping bitboard representation (A1 = bit 0 or A8 = bit 0), so far none of the tools seems able to do that.
(I use somewhat nonstandard A8 = bit 0, H1 = bit 63 :)
Ah sorry, Julien's tool can do that :)
Giuseppe Cannella's online viewer/calculator has three mapping as well:
http://butterflychess.altervista.org/bi ... /Calc.html
Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 6:18 pm
Location: Austin, TX

Re: Free Bitboard Viewing Utility...

Post by Tom Likens »

Steve Maughan wrote:It's difficult to imagine developing a bitboard chess engine without the ability to view a bitboard as a chess board (and vice-verse). So I created a little bitboard viewing application

More here: Chess Bitboard Viewer

It's really nothing special, but it may be useful to others,

Steve
You're definitely a "Bitboarder" now. Such a utility was one of the first things I wrote
after creating Djinn. I think it was also one of the first things I wrote in Qt. Gerd and
some others have since done it (much) better but I still use it all the time and it has
a fond place in my heart.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Free Bitboard Viewing Utility...

Post by lucasart »

Steve Maughan wrote:It's difficult to imagine developing a bitboard chess engine without the ability to view a bitboard as a chess board (and vice-verse). So I created a little bitboard viewing application

More here: Chess Bitboard Viewer

It's really nothing special, but it may be useful to others,

Steve
Great. Certainly very useful. I've always been too lazy to do that, so when I code, I calculate the bitboard in my head (it's not too hard in hexadecimal once you get used to it). Then I run the code in debug with a statement like "print_bitboard(b)" to check that it's correct.

If I could use a bitboard calculator instead, it would be easier :D

I also found this one, which runs in your browser directly, so there's nothing to download and install
http://butterflychess.altervista.org/bi ... /Calc.html
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Free Bitboard Viewing Utility...

Post by Gerd Isenberg »

Gerd Isenberg wrote:
mar wrote:Gerd Isenberg got the same idea too :)
http://chessprogramming.wikispaces.com/Bibob
I would like to be able to have the option for flipping bitboard representation (A1 = bit 0 or A8 = bit 0), so far none of the tools seems able to do that.
(I use somewhat nonstandard A8 = bit 0, H1 = bit 63 :)
Ah sorry, Julien's tool can do that :)
Ok, next weekend or so I will add some modes for all orthogonal mappings, as well as unary flip- and mirror operators...
8 orthogonal mapping modes:
LERF, LERBEF
BERLEF, BERF
LEFR, LEFBER
BEFLER, BEFR
unary flip and mirror.
https://chessprogramming.wikispaces.com/Bibob
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: Free Bitboard Viewing Utility...

Post by AlvaroBegue »

Are all those modes used by people? I used LERF in my first attempts at bitboards and I find LERBEF much much easier. LERBEF makes reading a hex constant from left to right correspond to reading the board in the usual order (top to bottom and left to right, as we do in FEN).

I don't really use a tool because I can do the conversion to and from hex in my head. I did write a little function to print out a board using '_' and '*' for 0 and 1 bits, which I used for a couple of days while I was getting the move generation to work (primarily to verify magic bitboards were working) and never again.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Free Bitboard Viewing Utility...

Post by Gerd Isenberg »

AlvaroBegue wrote:Are all those modes used by people?

Don't know, but nowboby can complain now ;-)
There are some who have ranks in the lower triple, which makes generating pawn captures a bit cheaper ...
AlvaroBegue wrote:I used LERF in my first attempts at bitboards and I find LERBEF much much easier. LERBEF makes reading a hex constant from left to right correspond to reading the board in the usual order (top to bottom and left to right, as we do in FEN).
Yes, good argument. Too late for me now. I always used LERF, and as a consequence I confuse left and right, and west and east now, and port and starboard anyway ... ;-)
AlvaroBegue wrote:I don't really use a tool because I can do the conversion to and from hex in my head. I did write a little function to print out a board using '_' and '*' for 0 and 1 bits, which I used for a couple of days while I was getting the move generation to work (primarily to verify magic bitboards were working) and never again.
Worked for me as well - even with LERF. The tool was nice to understand fill-multiplication.