MSDN Archive Home
Help and FAQs
VB Micro Chess (Huo Chess)
All Resource Updates
Change History (all pages)
This code samples page is now
Find the newer versions of Huo Chess at
. See a detailed explanation of the Huo Chess algorithm at
VB Micro Chess (Huo Chess)
VB Micro Chess is a free and fully open source chess engine. The VB Micro Chess presented in this page is a Visual Basic port of the Huo Chess engine (
). Huo Chess is developed and maintained by Spiros (Spyridon) Kakos (
for the C# Edition of Huo Chess.
for the XNA Edition of Huo Chess with Graphical User Interface.
Currently VB Micro Chess (Huo Chess) is at version 0.82 at a total of
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. The source code is fully available and heavily commented.
The algorithm used in this program for the implementation of the computer thinking is the "Brute Force Algorithm." 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).
For games played by Huo Chess and for an
analytical explanation of its underlying logic
. (that page refers to the Huo Chess C++ version, however it applies to the Visual Basic version as well)
For a tutorial on how to develop a chess software application on your own see the
How to Develop a Chess Program for Dummies
. This tutorial is based on the Huo Chess and it is written by the creator of Huo Chess himself.
Huo to customize
Use Microsoft Visual Studio 2008 or Visual Studio 2010 to customize the code.
You can use the
Huo Chess Opening Book Editor
to create your personalized Opening Book for Huo Chess. You can find the Opening Book Editor at
at the MSDN Huo Chess C++ edition home page. The folder with the opening book entries must be in the same folder as the Huo Chess executable (see the Huo Chess Opening Book Editor page for more instructions).
You can also add more thinking depth capability, by adding new ComputerMove functions (like ComputerMove2, ComputerMove4 etc.), change the value of ThinkingDepth variable and make the necessary adjustments to the HumanMove function (add another if at the point where it calls the ComputerMove functions). Moreover, you can also optimize the way Huo Chess thinks by changing the CountScore function and the way the computer values the pieces or the chessboard position. For example, if you change the score of the Queen in the CountScore function from 9 to 12, then the HY will play aggressively to attack the opponent's queen and at the same time try harder to defend its own queen. You can also — for example — give a high scoring to the existence of an opening column with a rook controlling it, so as to make the computer play more with its rooks and try to take over columns with them. Any FEEDBACK is WELCOME with better configurations of the Opening Book or the CountScore function!
The program requires .NET Framework 2.0 or higher to operate.
Sep 28 2011 at 4:43 PM
, version 8
Sign in to add a comment
VB Micro Chess v0.82
Wed Aug 5 2009 at 7:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.