Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: move generator bug

Author: Tord Romstad

Date: 04:50:52 02/20/06

Go up one level in this thread


On February 19, 2006 at 22:11:11, Sean Mintz wrote:

>As I try to figure this out, perhaps you have an idea as to what it might be:
>
>[D]8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - -
>
>depth   correct       what I get
>
>1 	14            14
>2 	191           191
>3 	2,812         2,812
>4 	43,238        43,238
>5 	674,624       674,624
>6 	11,030,083    11,030,078
>
>So, at a depth of 6 ply, I come up 5 moves short.

I don't have any good advice about this particular position, but this is
how I solve this sort of problems in general:

First, you need an open source program which you know give correct perft
scores (i.e. Crafty).  Modify this program to print perft numbers not only
print the perft number for the position for the board, but also each
subtree below each move at ply 1.  For the position above, you should get
output similar to the following:

Subtree below move e2e3: 745505
Subtree below move g2g3: 271220
Subtree below move e2e4: 597519
Subtree below move g2g4: 892781
Subtree below move b4b1: 1160678
Subtree below move b4b2: 818501
Subtree below move b4b3: 941129
Subtree below move b4a4: 745667
Subtree below move b4c4: 1027199
Subtree below move b4d4: 957108
Subtree below move b4e4: 860971
Subtree below move b4f4: 174919
Subtree below move a5a4: 868162
Subtree below move a5a6: 968724
perft(6) = 11030083

Make your own program print similar statistics for each move.  For at least
one of the moves, the numbers will differ between the two programs.  Execute
this move in both programs, and do a perft(5) from the resulting position.  By
using this procedure recursively, you will quickly be able to zoom in on the
exact position where your program generates too few (or too many) legal moves.

Good luck!

Tord



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.