Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about using Crafty to debug my program's perft

Author: Keith Evans

Date: 08:19:41 07/17/03

Go up one level in this thread


On July 17, 2003 at 02:26:19, Albert Bertilsson wrote:

>A great way to find buggs in move generation is this:
>1. Have a command that instead of calculating perft calculates the perft values
>for all the children, and prints the list like this:
>b1c3 9755
>b1a3 8885
>g1h3 8881
>g1f3 9748
>a2a3 8457
>...
>2. Have a correct version of your program or another program that can do this
>too.
>3. When there is a difference at any perft value you see exactly which move that
>leads you closer to the bug, do the move and calculate the perft values with
>depth - 1, very soon you'll be at level 1 and when you compare the list of
>children you'll see which move is missing, or illegal.
>
>If you need an engine to compare with you can use Sharper, I call the command
>"divide".
>
>http://www.albert.nu/programs/sharper
>
>/Regards Albert

Thanks - I was able to find my bug with the list of all moves, but your method
seems like a good idea when the error occurs really deep in the tree. I was
originally thinking of doing something like that by hand.

The list of all moves is really nice when feasible, because you just sort it and
diff it against a reference list and the missing or illegal moves pop right up.



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.