i think that implementing the attack getter functions, will take _about_ the
same time for both, magics or rotated, _if_ you are already familiar with those
techniques.
But because the complete code will be riddled with bitboard solutions, considering
* easy condition checks, up to...
* different kind of bitboard solutions,functions (like: see example)
* complete code chunks(eg SEE) or ...
* even complete rewrite of moduls like the move generator
example:
Code: Select all
static bb_t getInBetween(sq_t sq0,sq_t sq1)
{
bb_t tmp = 0;
if(tmp = mask_shared_line[sq0][sq1])
{
tmp &= (allbits << sq0) ^ (allbits << sq1);
tmp &= tmp-1;
}
return(tmp);
}
In the long run, you will save time using magics,
even it _would_ take less time to inroduce rotated because you _might_ already know rotated
but might not be familiar with magics.
Beside the fact, that the rotated approach _still_ belongs to the fastest approaches,
one really disadvantage is (imo), that is part of the board representation. Other
approaches like magics can handle _temporarily_ bitboard states much more easily, so
you will find more general solutions, and more general solutions will save time in a
long run, and provide more elegant and faster solutions too.
Now, my advice to you is in any case, _not_ to do a simple replacement of the attack-getter
functions, but to write the code from scratch. This will take some weeks, _but_
otherwise you will see in some weeks, that _most_ of your existing code is suboptimal with
respect to bitboards and you will start anyway from scratch. (My experience some years ago,
going from x88 approach to bitboards).
imho, regards
Michael