There are some good sites on how to write a chess playing computer program. (Do a search with your favourite engine.) One example is Chess Programming My current favourite is the Chess programming Wiki
I have written a simple chess program designed to show how a chess engine might work. The code has been kept relatively simple to make it easier for intermediate programmers to follow. The source code of bbbc is online.
On and off over the years I have experimented with my chess playing program (Awesome). It is written in Borland C++ and was written entirely from scratch with many original approaches.
Awesome examines only a few moves compared with most chess engines, but sees quite deeply, thanks to good move ordering and other factors. In a one minute game, it is sometimes able to store every position examined in a game, in the hash table. It some ways it emulates the way a human player thinks. One of my aims is to make the search tree as small as possible (without losing any effectiveness).
With the help of Winboard and its author Tim Mann (who runs a group designed to assist those developing their own chess engine) it has run automated at the ICC (and sometimes Fics.) Download Winboard at Tim Mann's Chess Pages.
Download the Win32 (freeware) version (only useful if you have Winboard) here awesome174.zip 278K
The zip file includes awebook.txt, which is an opening library,
and a dynamic link library CW3215.dll which is required for it to work.
If you email me any interesting games played with Awesome, whether it is against a person, itself or another engine, I will add a web page of Awesome games.
With the Winboard version you can play 2 engines against each other, and you have a better interface than the Dos version.
Awe174 now works with Arena However, you need to add -xreuse to the command line parameters (under Engine Management).