You are wrong regarding the need of precalculated data for "Hyperbola Quintessence": https://chessprogramming.wikispaces.com ... intessencehgm wrote:I dislike the dumbfill code because it is repetitive in the lines in the routines for a single direction (making it more bug prone, as you might mis-count the number of repetitions), as well as needing separate routines for a lot of different directions. And O^O-2R also does not need pre-calculated data. But I don't see that as an advantage other than for speed. Bitboards heavily make use of pre-calculated tables, for the leapers if not for the sliders. If you want to use them, better get used to it.
Code: Select all
struct
{
U64 bitMask; // 1 << sq for convenience
U64 diagonalMaskEx;
U64 antidiagMaskEx;
U64 fileMaskEx;
} smsk[64]; // 2 KByte
If you imply that "Kindergarten bitboards" do not need precalculated data then you would be wrong again, they need about the same precalculation infrastructure as "Hyperbola Quintessence", see here: https://chessprogramming.wikispaces.com ... +Bitboardshgm wrote:'Kindergarten bitboards' would seem a much more educative first step to get acquainted with bitboards and teach you the elementary techniques. Dumbfill more seems an example of how to not do things.
Also the implementation of "Kindergarten bitboards" is not as simple as you state, please note the section about file attacks on that same page. It is certainly a lot more bit twiddling than the simple "dumb7fill" or similar techniques.
Few years ago Michael Hoffmann has posted a really simple attack getter solution based on direct calculation, it is one of the nicest ones to my taste and will certainly cause No headache So I'd even recommend that one instead of dumb7fill if you prefer very short code ...