Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: perft results (how accurate is accurate enough ?)

Author: Tom Likens

Date: 19:27:57 09/23/04

Go up one level in this thread


On September 23, 2004 at 16:58:33, Roman Hartmann wrote:

>hello all,
>
>while testing my move generator (10x12 array, only legal moves) and comparing
>the perft result from Crafty and my own results I noticed that my results differ
>for some positions a bit. As the results start to differ only at some depth it's
>not that easy to track this bug. Although I'm quite certain that the problem is
>somehow related to EP-moves I wasn't able to solve this riddle yet.
>
>By searching the web I found some websites with perft results from other chess
>engines with numbers even more off than the results from my move generator.
>
>some results -total nodes- from my move generator (proper Results from Crafty):
>rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
>perft 4: 20603 ok
>perft 5: 5072212 ok
>perft 6: 124132506 (124132536) differ
>
>r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq -
>perft 3: 99949 ok
>perft 4: 4185800 (4185552) differ
>perft 5: 197909832 (197876242) differ
>
>8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - -
>perft 3: 3017 ok
>perft 4: 46264 (46255) differ
>perft 5: 720964 (720879) differ
>perft 6: 11761790 (11750962) differ
>
>8/PPP4k/8/8/8/8/4Kppp/8 w - -
>perft 5: 1840260 ok
>perft 6: 36177037 ok
>
>Well, as searching for this bug has allready consumed much more time than I ever
>expected it would I'm not sure -after having seen this sites- that the the move
>generator has to be perfect in order to create a working chess engine. On the
>other hand my move generating process is quite complicated and I'm not sure if I
>will still understand all the parts of it in a few months like I do understand
>them now.
>
>What should I do about that? Try to track down this bug at any price or just go
>on an do some work on other parts of the engine and fix this bug later? Or
>should I just forget about the bug at all?
>Thanks for all suggestions in advance.
>
>Best regards
>Roman

Hello Roman,

You should probably fix the bug, if you don't this will bite you when you
enter your first major computer chess tournament and you're playing Shredder
for the championship of the world.  To help I've included the output from
my chess program Djinn for your 2nd and 3rd positions, (if you're interested
you can download the engine at):

http://webpages.charter.net/tlikens

Anyway, here's the output for the positions mentioned above.

==========
POSITION 2
==========

r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1

 WHITE<1> perft -v 5

Total number of moves for depth 1: 48

                White               Black
                =====               =====
 NORMAL         36                  0
 CAPTURE        8                   0
 ENPASSANT      0                   0
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     1                   0
 CASTLED_QS     1                   0
 PAWN_JUMP      2                   0

Total number of moves for depth 2: 2039

                White               Black
                =====               =====
 NORMAL         0                   1549
 CAPTURE        0                   350
 ENPASSANT      0                   1
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     0                   46
 CASTLED_QS     0                   45
 PAWN_JUMP      0                   48

Total number of moves for depth 3: 97862

                White               Black
                =====               =====
 NORMAL         73452               0
 CAPTURE        17057               0
 ENPASSANT      45                  0
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     1625                0
 CASTLED_QS     1537                0
 PAWN_JUMP      4146                0

Total number of moves for depth 4: 4085603

                White               Black
                =====               =====
 NORMAL         0                   3078017
 CAPTURE        0                   747402
 ENPASSANT      0                   1929
 PROMOTION      0                   7340
 PCAPTURE       0                   7832
 CASTLED_KS     0                   62119
 CASTLED_QS     0                   65894
 PAWN_JUMP      0                   115070

Total number of moves for depth 5: 193690690

                White               Black
                =====               =====
 NORMAL         145297283           0
 CAPTURE        34967567            0
 ENPASSANT      73365               0
 PROMOTION      5908                0
 PCAPTURE       2484                0
 CASTLED_KS     2624637             0
 CASTLED_QS     2369000             0
 PAWN_JUMP      8350446             0

   Depth     Peft(depth)      Total Nodes
   -----     -----------      -----------
     1                48               48
     2              2039             2087
     3             97862            99949
     4           4085603          4185552
     5         193690690        197876242

==========
POSITION 3
==========

8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1

 WHITE<1> perft -v 6

Total number of moves for depth 1: 14

                White               Black
                =====               =====
 NORMAL         11                  0
 CAPTURE        1                   0
 ENPASSANT      0                   0
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     0                   0
 CASTLED_QS     0                   0
 PAWN_JUMP      2                   0

Total number of moves for depth 2: 191

                White               Black
                =====               =====
 NORMAL         0                   165
 CAPTURE        0                   14
 ENPASSANT      0                   0
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     0                   0
 CASTLED_QS     0                   0
 PAWN_JUMP      0                   12

Total number of moves for depth 3: 2812

                White               Black
                =====               =====
 NORMAL         2326                0
 CAPTURE        207                 0
 ENPASSANT      2                   0
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     0                   0
 CASTLED_QS     0                   0
 PAWN_JUMP      277                 0

Total number of moves for depth 4: 43238

                White               Black
                =====               =====
 NORMAL         0                   37886
 CAPTURE        0                   3225
 ENPASSANT      0                   123
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     0                   0
 CASTLED_QS     0                   0
 PAWN_JUMP      0                   2004

Total number of moves for depth 5: 674624

                White               Black
                =====               =====
 NORMAL         570042              0
 CAPTURE        50886               0
 ENPASSANT      1165                0
 PROMOTION      0                   0
 PCAPTURE       0                   0
 CASTLED_KS     0                   0
 CASTLED_QS     0                   0
 PAWN_JUMP      52531               0

Total number of moves for depth 6: 11030083

                White               Black
                =====               =====
 NORMAL         0                   9650914
 CAPTURE        0                   906585
 ENPASSANT      0                   33325
 PROMOTION      0                   7112
 PCAPTURE       0                   440
 CASTLED_KS     0                   0
 CASTLED_QS     0                   0
 PAWN_JUMP      0                   431707

   Depth     Peft(depth)      Total Nodes
   -----     -----------      -----------
     1                14               14
     2               191              205
     3              2812             3017
     4             43238            46255
     5            674624           720879
     6          11030083         11750962

best of luck,
--tom



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.