Monday, August 27, 2007

Yet another chess engine...

... but this one is mine!

Chess programming is actually the main reason why I bought my first computer, an Amiga 500, fifteen years ago : my best friend told me it was impossible to code a chess program in Amiga basic. I bought the Amiga and started working. Two months of hard coding later, I had won the bet : my program was playing chess. Well, kinda. It took twenty minutes for it to play a very bad move, with a two-plies search. But that was a begining.

What happened during the following fifteen years, then ? Not much. I got too busy with my law studies and so on to take it any further. Though the routines for my moves generator can be traced back to 2001 and so is my minimax search and my alpha-beta pruning.

As I had time during this summer vacation, I started it all again and... voilà! After a month of happy coding, I have now a full working UCI chess engine wich ranges around 2000 Elo. That's a good start for a first try, though I probably won't publish any binary until the engine reaches at least 2500 Elo. Up to now, it can defeat engines like Tom Kerrigan's TSCP. Oh my! I got so joyfull when it won its first game against TSCP!

Prédateur is the name. It's coded in FreePascal under Lazarus IDE. The source code is about 2500 lines long and it computes a small 100KNodes/s on my Dual-Core Pentium D running at 2.8GHz. Not that much, eh? But it's just the beginning and it improves each day. I'm quite proud of my move ordering though, making it able to compete with engines that computes four-five more nodes per second.

No comments: