Technical Overview

Djinn is written in C++ with a smattering of inline assembly.  It utilizes bitboards to represent the chess board and pieces.  An approach popularized by Robert Hyatt and his program Crafty.  Although to be honest, I've been interested in bitboards ever since I read the Atkin and Slate paper on Chess 4.5 (circa 1978).  I've always had a hardware bent (I'm an Electrical Engineer by trade) and the elegance of the idea was immediately apparent to me.

Djinn uses C++ as a better C.  I don't take advantage of inheritance or virtual functions or any of the other more esoteric C++ language features.  Bjarne Stroustrup, the creator of C++, would be disappointed and probably appalled by my code. Still its organization is fairly clean and well commented so I'm not unduly satisfied. 

Djinn is a relatively slow searcher, reaching speeds of roughly 350-400 nodes/sec on an AMD Athlon 1800+ under Linux.  As a benchmark, Crafty is probably 2.5x faster on the same hardware, which explains some of the strength difference between the two programs.  Djinn spends most of its time in the evaluation function.  Because of the way I've structured the program (and specifically the king safety) it is almost impossible for me to use "lazy evaluation".  I intend to integrate some form of lazy evaluation into the program eventually, but it needs to be done carefully so that I don't end up "throwing the baby out with the bath water".

My main development environment is Linux, although I support a Windows version as well.  I regularly compile the program under Linux using gcc 3.x and the Intel ® C/C++ compiler.  Under Windows the program is compiled using Microsoft ® C/C++ 6.0 and the Windows version of the Intel compiler.  Compiling the program under three distinct compilers keeps the code (and me) honest.  It also helps me to catch bugs and questionable code constructs.  Ultimately, release versions get compiled with the Intel compiler since it creates, at least for Djinn, the fastest executable.

<<  >>
[home]