Creating a chess engine (part 6: final thoughts and a game)
May 13, 2010, 4:21 PM 5
This will be my final part (so far I think) of this small series concerning chess engines. I started this project about a month ago and in that time I have managed to create a fairly strong chess engine (and still do the day-job - need money for food:-)). Its not quite up there with rybka, fritz and stockfish and those state-of-the-art engines. But considering the low amount of time I have put into this project I am quite satisfied with the result. I have played few blitz games with it myself and it has also played a longer correspondance game against a friend of mine rated around 1950. Based on those results I would say it has an ELO of somewhere in the range of 2150-2300 in rating - its a bit difficult to say exactly. With this rating it will place itself on the list of top 50 engines (low yes, but would be there! This list is recognised by most people as the closest to an official ranking of engines - see http://ssdf.bosjo.net/list.htm) I do not think its at either IM or GM level yet. Mainly because it is not that good in endgames and it is not fast enough which means it cannot reach a high enough search depth within a reasonable time frame. But optimizing algorithms and code for a chess engine is simply a never ending project - I will let the professional engine designers worry about that. For me it has been much more fun to create the engine - doing more optimizations to increase the playing strength are not really that fun I think - it feels too much like a real job, not a hobby! The engine is pretty good in tactical situations and is playing the middle game quite well and the opening book is decent enough. The main problem is the endgames - room for improvement there.
I will finish the series with comments of a game it played against a friend of mine around 1950 (he knew he was playing my engine - I was not trying to trick him!). Some of the moves there are quite easily spotted as computer moves and I will try to explain (if I can) what caused it to make those moves. Hopefully, this will give you some insights as to why computers make those strange moves sometimes. Hope you had as much fun reading this series as I had creating the engine. To be honest, in fact this is not my first chess engine! In my teenage years I also created a chess engine (in the Pascal programming language) with an opening book and a graphical user interface for people to play with. But once the engine was out of the opening book it just selected a completely random legal move. I was not clever enough at that time to implement optimized recursive tree algorithms. So in a way by making this into a real playing engine (in Java this time around) I feel I have finally vindicated my younger self's lack of skills:-) I guess those 5 years at university was not a complete waste of time then:-)
In closing I will say that I think it does not really matter how strong engines become - chess will always be a fun and challenging game for humans even if we have engines with 4000 in rating. A game that has been around for about 1400 years is not fading away! It is the knowledge that your opponent or yourself could at any moment make a blunder and that it is so difficult not to make any blunders at all that is the fun challenge in chess. I think serious OTB tournament chess is the most difficult mental activity I have ever tried. As we recently saw in the Topalov-Anand match in the final game 12: Even the best players around 2800 elo can blunder and are still influenced by nerves and other human emotions when playing.