Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about debugging my move generator

Author: Peter Fendrich

Date: 03:37:16 06/20/01

Go up one level in this thread


On June 20, 2001 at 04:36:44, Uri Blass wrote:

>I use the perft command in crafty in order to debug my move generator.
>
>I found that perft 4 gave me correct result when perft 5 does not give me
>correct result and I got 4865621 instead of 4865609.
>
>After finding it
>I calculated the perft 4 after every legal move and found that perft 4 does not
>give correct result after 1.d3
>
>After finding it I checked perft 3 after d3 to see where my program is wrong and
>found that after 1.d3 c5 I got 15972 instead of 15971.
>
>I now need to continue in this way to check where is the error.
>
>Is there a faster way to debug the move generator?
>
>Did other programmers use the perft command in Crafty to debug their move
>generator?

I am using a variant of perft that also collects number of moves for each piece
in the leafes.

For instance my variant of perft 4:
------------------------------------------------------
nodecnt 4

Depth=1: 20     P=16, N=4, B=0, R=0, Q=0, K=0
                p=0, n=0, b=0, r=0, q=0, k=0

Depth=2: 400    P=0, N=0, B=0, R=0, Q=0, K=0
                p=320, n=80, b=0, r=0, q=0, k=0

Depth=3: 8902   P=5926, N=1760, B=556, R=200, Q=340, K=120
                p=0, n=0, b=0, r=0, q=0, k=0

Depth=4: 197281 P=0, N=0, B=0, R=0, Q=0, K=0
                p=131237, n=39124, b=12266, r=4458, q=7563, k=2633
----------------------------------------------------

I have to do the same debugging procedure as you did but I think it will go
somewhat faster.
I can see what piece type that goes wrong on what ply level and if it's of
the right color.

//Peter



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.