chessboard

Hello!

Hello and welcome to my chess programming blog where I plan to document the development of my very own chess engine.

So, why do I want to write a chess engine? It all began when my son started learning chess. At first, when he was just playing in his school club I could use my rudimentary chess skills to provide a reasonable opponent. But over the next couple of years he started competing in Sussex Junior Chess events and got stronger and stronger. Now he is 9 and has just been selected for the Sussex team. This all means that when I play him I quite often “let him win” – in other words I lose.

I started trying to improve my game and have had some success by reading, playing online and solving chess puzzles but progress is slow. Being a software engineer I wondered if knowing and understanding how a computer plays chess would help me in my game.

This project documents my progress in researching computer chess and implementing my very own chess engine. I’m not sure now far I’m going to go with this engine but I plan to at least make it be able to beat me – not a hard challenge!

4 thoughts on “Hello!”

  1. I think your plan is upside down. First make it correct, then make it fast.

    On the other hand, a sensible choice of data structures such as hash tables can prevent you from wasting time doing the same thing over and over when you have already done it.

    Bon chance, and have fun.

    1. I know what you mean and I would normally agree with you. However, the code that I have currently written about only took a couple of evenings – I’m much faster at writing code than I am at writing about it! Whilst I was writing the code I realised I would probably have more luck (and more fun) optimising a bitboard type board. The 0x88 implementation was at the time virtually fully working so I thought it would be useful for debugging the bitboard representation.

      I currently have a fully working bitboard implementation that is about 20 times faster than the 0x88 implementation (on my system, perft(6) takes 60s for the 0x88 board and 3s for the bitboard) and I haven’t finished implementing it yet. I plan to cover the optimisation process in future posts.

      The 0x88 board implementation has been invaluable for fixing errors in the move generation of the bitboard – I used it to implement a divide function that could mostly automate the process of finding invalid or missing moves.

      Thanks for reading!
      Roy

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">