Bitboards Magic Number Research

I’ve quite happy with the global list of possible move.  Now I need to turn my attention to move generation.  For the pieces which don’t slide (i.e. pawns, knight and kings) this is trivial.  For sliding pieces I’m going to use the “new kid on the algorithmic block” – Magic Bitboards.  I’m in the process of going over Pradu Kannan’s 2007 paper.  I need to think about how I will generate my magic multipliers.  At this stage I’m not sure if I’ll do it in Delphi or C.  I also think a fixed shift seem to be sensible (from simplicity).

  • Hi threre; many people in the world indeed… I am busy rewriting my own engine (called “vicki”, as well and I’m busy with the exact same thing that you are! For an added kicker, I want to calculate the magic numbers myself (i.e. I’m not allowed to look at any code) – which is were I am at now. Personally, I’d recommend you do it in c, really. Delphi was a great language, but it lacks the descriptive power that c does. I’m going the Java route (cross-platform, and easy to rewrite into c if I should later choose). Good luck with your engine! I’ll keep in touch!

    PS. Are you supporting Winboard or UCI yet?

    • Steve Maughan

      Hi Jaco – thanks for the comment! I’ve bolted on my basic UCI code from Monarch chess, my last engine. It worked well so it’s a good short term solution.

      As for generating the magics, I spent a couple of hours yesterday trying to get my head around it. It’s not trivial. I did do some coding in Delphi (simpy because I can hack code out quicker in Delphi). I still don’t have the magics generated but I’m slowly getting to grips with the generation process. Like you, I don’t want to copy the magics, or the code from anyone else!