Author: Frank Phillips
Date: 06:09:25 09/09/01
Go up one level in this thread
On September 09, 2001 at 03:59:19, Adrian Macnair wrote: >I have a few links which explain the fundamentals of creating a chess program, >but I'm not sure exactly where to start. How much C/C++ programming do you need >to become a chess programmer? Where would be a logical place to start? Could >those who have made their own programs please tell me what the few first few >steps were? I am sure once I get started I can continue to keep the ball >rolling. Adrian It is reasonably straight forward to write a decent chess program. Not easy; and it will take a long time of sustained effort before you have something working, if you are starting from scratch. One or two here could probably write a chess program in a day or two, but they have forgotten just how much they know. They are probably also professional programmers. You could start with something simpler to teach yourself basic techniques and programming/C/C++. If you already have programming skills then this may all seem slow. I had none, other than a little BBC Basic, and so spent a lot of time learning C and other essentials, including the mechanics of how to compile programs etc. I started with a knight tour and other simple game - noughts and crosses, connect four, Kalha, othello .... These help you learn the basics: programming, board representation, search (recursion) etc. The principle of any game program is similar: get input, play a legal move on a board, check whether the game is over, generate a legal computer move etc. My first efforts (othello etc) initially chose moves without search (the search function simply returned a randomish move based on static evaluation of the position) just to ensure that the rest was working before the search was added. If you want to, have to, or are able to jump straight into chess, then Bruce Moreland's Gerbil source code is a revelation. (If only I had learned such clear programming habits.). I was helped greatly by Tom Kerrigan's simple chess program code - TSCP. When you get your program working, Bob Hyatt's comments in his code for Crafty will be a great help in identifying the sort of things that might make your program play better chess. But it will probably be a long time before you understand the code. When your thing is working the internet chess servers are great place. Finally a warning.........it is very addictive. I hope you have a very understanding wife :-) Frank
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.