Hello guys!
I think it is better to explain how chess programs work.
Parts of a Chess program:
a) Graphic Interface (GUI): it is the window that contains the board and pieces and the list of moves of the game. It is only used to show information to the user.
b) Engine: it is a small program in itself, you could run some of these in a command line (do you remember old D.O.S. programs?).
What is inside the engine?
-There is a set of data structures for representing the board, the list of pieces and a tree for containing the positions to be analyzed.
-The evaluation function that it is going to give a give a value to each position depending of the move that originated it (MinMax algorithm).
-A lot of algorithms: for generating the moves to be evaluated, alpha-beta pruning for removing the "bad" moves from the tree of positions.
-Permanent Brain: the engine can analyze while the adversary is thinking.
-Communication Protocol: this lets the GUI to communicate with the engine.
UCI is a very popular protocol.
c) Opening Tree (or opening book): for those that have chessbase products, you are going to find a file *.cbt, this file has all the right moves the engine can use. It is interesting to note that some moves have a ?. This is because it is a bad move or this move is going to lead to a close position where the full power of the engine can't not be used. The engine starts analyzing when it can't find more moves in the opening book.
d) Endgame Data Base: Nalimov tablebases probably the most well known.
This can show you the result of the ending and what is the list of moves to achieve the optimal result.
When you buy a Chessbase product, you get the Fritz GUI and one of the engines (Fritz, Houdini or any other). And this is the tricky part, when you have a GUI, you can download any free engine from the internet and make it work in your computer.
Do you need to spend a lot of money?
No, there are some free GUI in the net, one of the best GUI is Arena.
There are some free "old" versions of: Houdini, Komodo, even the last
Stockfish version (the winner of the last TCEC season 5 2014) is already out.
Cool things to do with engines:
-Organize your own engine tournament. You can even set up the position you want them to start playing.
-Analyze old classical games:
Could Fischer draw the first game against Spassky in 1972?
What about Botvinnik vs. Bronstein? Botvinnik was a rook up!!!
Could Short win one more game against Kasparov?
-Solve some chess problems by yourself and compare the solutions.
Why am I explaining all this?
I believe all the people have the right to get the tools now available to improve their skills.
What is not right is to use these tools to take advantage of your adversary.
For those interested in programming an engine, Stockfish and Fruit source code is available.
They were written using C/C++.
Good sources of information:
-Robert Hyatt (Crafty programmer) online documents
-The Chess Programming Wiki.
I have seen the Fruit source code and looks very neat, well organized.
Parts of Fruit were used to create the now "banned" Ribka.
Hope you have a nice day! 🙂
PD: Programming a chess engine is a serious commitment, if you want to make a really good one, you will probably have to write more than 2000 lines of code. And I am not talking about all the hours invested in the project (coding, debugging, testing, optimizing, etc).