Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: SEE checking

Author: Tony Werten

Date: 00:31:19 12/01/00

Go up one level in this thread


On December 01, 2000 at 02:49:54, Christophe Theron wrote:

>On November 30, 2000 at 02:33:06, Scott Gasch wrote:
>
>
>
>What you are doing is the right thing to do.
>
>I have the same overly paranoid debug code spread all over Chess Tiger's
>sources. After so many years of chess programming, it turns out that it is not
>paranoid at all. It is just enough to catch very nasty bugs.
>
>So from time to time, without any special immediate need, I add paranoid
>checking code. I have #if (DEBUG_xxx) conditionals all over the sources
>(DEBUG_xxx allowing to turn on checking code for a specific thing).
>
>A very efficient way to find bugs is to have several versions of the same
>routine. For example, generate moves in several different ways, collect the
>resulting moves lists, and compare them. That's what I do in "debug genmove"
>mode. I have also a code that compares the incrementally computed hash codes to
>hash codes computed from scratch in every position. An obvious thing to check, I
>would say.
>
>From time to time I launch a big test. The program has to compute a given number
>of fixed positions to a given ply depth with all the debug code turned on. It
>runs 20 times slower than the normal version, but I feel more comfortable once I
>have run this test and no error has been found. The goal is not to check if the
>program finds the right moves for the positions, but just to check that the
>debug code does not catch a problem.

For some sort of stupid reason, by bugs are ( by far ) in de checking code. This
means I spend a lot of time trying to fix my original code to find out I was
just comparing the wrong stuff.

Tony

>
>However, it's never enough. Let the program play automatically 400 games and it
>might find itself another well hidden bug.
>
>
>
>    Christophe



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.