Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Designing Chess Programs

Author: William H Rogers

Date: 11:08:32 06/24/02

Go up one level in this thread


When I first started writting my program, I did not have access to anyones elses
coding. I tried to find some to no avail so I just started writing some code. I
knew how I wanted to represent my chess board and I knew that some kind of move
generator was needed. Not knowing how to put the whole thing together, I decided
to write eveything as subroutines with the hopes of tying it all together when I
was finished. After writing a move generator for the knight, then the rook and
bishop, I decided that I was on a roll. Then when I wrote the move generator for
the queen, I stopped. I realized that I was writting the same subroutine over
and over again, with only different direcions, etc. I went back and consolidated
the whole thing into one move generator using indexes for the directions and
number of steps for each piece. By the time I had finished most of the coding, I
realized that 90% of the program was done and all I needed was a driver of some
sort and that became rather easy. It WORKED!
All of my programming was done in 'Basic', but the real challenge is still ahead
as most programmers will attest to, and that is slowly improving the playing and
strength of the games itself.
The most common mistake that I see most beginners make is to try to put the
'cart before the horse', that is, they have access to so many different programs
with coding available that they start thinging on how to make it better even
before they have a basic model that will play chess to begin with.
Even with 'humans' today, we all start off at the bottom of the chess ladder as
far as playing strength is concerned and slowly advance to better players, that
is why there is a rating system in chess, to mark our progress. So start with a
very simple program that plays legal chess, then try to make it better.
Bill



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.