Computer Chess Club Archives


Search

Terms

Messages

Subject: No Bitboard Discussion here

Author: Peter McKenzie

Date: 21:39:50 08/30/03

Go up one level in this thread


On August 30, 2003 at 14:37:44, Tord Romstad wrote:

>My program has reached the stage where it is so complicated and ugly that I
>no longer understand clearly how it works (it's rather miraculous that it
>works at all), and there are many parts of the code which I am afraid of
>touching because I am sure I will break something.  Besides, the program
>is horribly slow, searching only about 120 kN/s on a PIV 2.4 GHz.
>
>Because of this, I think it is time to throw away all the old code and
>start from scratch.  Before I do this, I will consider replacing my
>data structures with something more efficient.

Hello Tord.  Sounds to me like you have a basic software engineering problem
that you are hoping will be magically solved by a rewrite.  What is to guarantee
that if you do a rewrite, you won't find yourself in a similar position in 6
months time?  Sure you might have bitboards, but if you don't understand how
your current program works then why should you understand how a new program
works?

In general, my belief is that a rewrite should be a last resort to solve such
problems.  I think you'll gain more by writing unit tests for your existing
codebase, then take a refactoring approach.  The unit tests will allow you to
safely refactor your existing code, because they will pick up anything you
break.

The main benefits of this approach are:
- you keep a working program throughout the process
- you can keep the good parts of the existing program, and fix the bad parts
- you learn more about the mistakes you have made

Just my 2c worth.

cheers,
Peter

<snip>



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.