We already started with the wikibob wrote:I completely agree. It is easy for us to criticize, but I am not a member of every discussion board related to chess, but I am a member of the ICGA and read the journal as it comes out. If something is not published, how would one know it exists? Although I must add that I have had more than one NSF proposal get shot down for this very reason, because someone on the review panel knew of similar research that was not public, which makes it impossible to cite or use.michiguel wrote:Gerd, what is not published, it does not exist, and there are good reasons for academics to behave that way. What is published passed a reviewing process, what is not didn't. What I really encourage you to do is to publish your work and include whoever contributed it significantly as a co-author. It should not be difficult after all the fantastic work you did.
Miguel
That's the only reason I wrote the rotated bitboard paper, and why I am also going to do a parallel search paper on how Crafty works, just so it becomes well-documented and nobody will have to reinvent the same wheel again.
The magic stuff ought to be documented in a journal article as well. I'd be more than willing to help if needed, but the two leaders of the development should really document it...

Yes, it is easy to criticize. Their math and proof with congruent modulus is enlightening and instructive. Also in the meantime I am aware of perfect hashing versus minimal perfect hashing, I initially confused. Thus to claim perfect hashing is fine. Files and anti-diagonals are nearly minimal, diagonals have a huge gap.
Imho it is justified to criticize their conclusion and modality to (don't) test their approach against magic bitboards - where a paper + sourcecode by Pradu Kannan exists, as mentioned and quoted in the article.
64-bit modulus is not that cheap - maybe the authors were not aware of - even reciprocal multiplication takes some more operations per line as magic bitboards takes for both lines (ignoring memory issues). We already had similar discussions concerning bitscan. Isolated bit mod 65 versus De Bruijn multiplication plus shift right 58.
For (a mod constant):
Code: Select all
reciconst = 2^(64+k) div const ; // compiletime 64 bit constant
divbit128 = a * reciconst ; // 64*64 = 128bit
quotient = div128bit >> (64+k);
modulus = a - const*quotient ; // 0..const-1
occustate = bytelookup[modulus]; // for a minimal perfect hash, e.g. const = 514
The nature of magic bitboards, to map relevant occupancies of two lines, is far over my head. We have to deal with carries. So far there is only empirical trial and error how to feed in certain subset traversals, or to use low populated rngs. Is there a systematical way to maximize constructive collisions, where different redundant outer occupied bits share common attack sets?
Some more knowledgeable math guys like Trevor Fenner and Mark Levene should take some care on magic bitboards.