Search Wiki:
C# Micro Chess (Huo Chess)

C# Micro Chess is a free and fully open source chess engine. The C# Micro Chess presented in this page is a C# port of the Huo Chess engine (http://archive.msdn.com/huochess). Huo Chess is developed and maintained by Spiros (Spyridon) Kakos (http://www.kakos.com.gr).
Please visit http://archive.msdn.microsoft.com/vbhuochess for the Visual Basic Edition of Huo Chess.
Please visit http://archive.msdn.microsoft.com/xnahuochess for the XNA Edition of Huo Chess with Graphical User Interface.

Currently C# Micro Chess (Huo Chess) is at version 0.82 at a total of 52.5 KB in size.
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, see http://www.codeproject.com/KB/game/cpp_microchess.aspx. (that page refers to the Huo Chess C++ version, however it applies to the C# 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 tutorial at http://knol.google.com/k/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 Edition to create your personalized Opening Book for Huo Chess. You can find the Opening Book Editor at https://archive.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=huochess&ReleaseId=404 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!

Prerequisites: The program requires .NET Framework 2.0 or higher to operate.
Last edited Dec 11 2009 at 5:26 PM  by Kakos, version 20
Comments
Kakos wrote  Feb 1 2009 at 11:41 AM  

GAMES OF HUO CHESS
*******************

GAME 1

Date: 2009-01-25
Place: Athens, Greece
White: Microchess (as provided by BenLo Park)
Black: HuoChess v0.82 (with Opening Book)
Result: Draw by threefold repetition

1. e4 e6
2. Qh5 Qe7
3. Bc4 Kd8
4. d4 a6
5. Bf4 d5
6. exd5 f5
7. dxe6 Bxe6
8. Bxe6 g6
9. Qe2 Nd7
10. Bxc7+ Kxc7
11. Qc4+ Nc5
12. dxc5 Qg7
13. Qf4+ Kc6
14. Qf3+ Kxc5
15. Qd5+ Kb6
16. Qb3+ Kc7
17. Qc4+ Kd6
18. Qd5+ Kc7
19. Qc4+ Kd6
20. Qd5+ Kc7
21. Qc4+ Kd6
22. Qd5+ draw by threefold repetition

Huo Chess played a good game. It did not give up pieces without reason and did not lose chances to kill opponent’s pieces when possible.

disa15031992 wrote  Nov 27 2011 at 5:20 PM  
chess c#

http://letitbit.net/download/54781.5c04a53b5bc5f19b5889c34c3a51/?__chess.rar.html

Updating...
Page view tracker