6 people following this project (follow)

Project Description
An open source chess program which attempts to be smaller than the Commodore-era Microchess. It is implemented in three different editions: C++, C# and XNA (with GUI). The C# edition is just 52.5 KB in size. It applies multiple depth thinking and has opening book capability.

Analytical Project Description
Huo Chess by Spiros (Spyridon) Kakos (http://www.kakos.com.gr) is a free and fully open source micro chess program that attempts to be smaller in size than the Commodore-era Microchess. The goal is to create the smallest chess program that exists. More versions are to come in the future. I started developing the program in CLI C++ v8.0 (with Visual Studio 2008) and I named it "Huo Chess" for personal reasons. Now three editions of the program exist in C++, C# and XNA Framework (with GUI).
The program is also distributed via MSDN Code Gallery and via Codeproject.

Currently the last C# editions (0.93) of Huo Chess range from 47 to 60 KB in size. The respective emulation of Microchess (the first microchess from the Commodore era) in C is 56 KB.
However, it must be noted that the original Microchess, written in pure Assembly, was about 1 KB (http://www.benlo.com/microchess/microchess1.html)…something I believe no one will ever match!
Huo Chess plays decent chess and has managed to draw Microchess, but unfortunately will probably lose if it plays with Garry Kasparov :)
Its algorithm can be used to study the underlying logic of a chess program or as a basis for your own chess program.

For games played by Huo Chess and for an analytical explanation of its underlying logic, see http://www.codeproject.com/KB/game/cpp_microchess.aspx. The program is heavily commented in plain English (some Greek exist also) and someone can easily understand how it works (especially in combination with the Codeproject article on Huo Chess).

The algorithm used in this program for the implementation of the computer thinking is the MiniMax algorithm for the C# 0.93 editions and the "Brute Force Algorithm" for all other versions. Huo Chess plays with the material in mind, while its code has some hints of positional strategic playing embedded. More analytically: When the program starts thinking, it scans the chessboard to find where its pieces are (see ComputerMove function) and then tries all possible moves it can make. It analyzes these moves up to the thinking depth I have defined (via the ComputerMove -> HumanMove -> ComputerMove2 path), measures the score (see CountScore function) of the final position reached from all possible move variants and – finally – chooses the move that leads to the most promising (from a score point of view) position (ComputerMove function).

huoChess.jpg

Please contact me via email or through the Discussions section of the project for questions regarding the source code or the algorithm of Huo Chess.

Last edited Sep 27 2011 at 4:49 PM by Spiros_Kakos, version 12