Perft Stats

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Jacob

Perft Stats

Post by Jacob » Sat Oct 13, 2007 5:18 am

I'm taking a little break from my engine. My next little project is to modify my perft program to gather some perft statistics, and probably throw together a web page. I was wondering if anyone had some data I could use for comparison to make sure it's working correctly. Here's a few sample positions (I'll improve the output later :roll:)

n nodes, x captures, ep en passants, c castles, + checks, # checkmates, = promotions

Code: Select all

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
         20n         0x        0ep        0c        0+        0#        0=
        400n         0x        0ep        0c        0+        0#        0=
       8902n        34x        0ep        0c       12+        0#        0=
     197281n      1576x        0ep        0c      469+        8#        0=
    4865609n     82719x      258ep        0c    27351+      347#        0=
  119060324n   2812008x     5248ep        0c   809099+    10828#        0=

Code: Select all

r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq -
         48n         8x        0ep        2c        0+        0#        0=
       2039n       351x        1ep       91c        3+        0#        0=
      97862n     17102x       45ep     3162c      993+        1#        0=
    4085603n    757163x     1929ep   128013c    25523+       43#    15172=
  193690690n  35043416x    73365ep  4993637c  3309887+    30171#     8392=

Code: Select all

8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - -
         14n         1x        0ep        0c        2+        0#        0=
        191n        14x        0ep        0c       10+        0#        0=
       2812n       209x        2ep        0c      267+        0#        0=
      43238n      3348x      123ep        0c     1680+       17#        0=
     674624n     52051x     1165ep        0c    52950+        0#        0=
   11030083n    940350x    33325ep        0c   452473+     2733#     7552=
Does this seem accurate, and is there any more information you would like to see included, such as pins?

YL84

Re: Perft Stats

Post by YL84 » Sat Oct 13, 2007 6:19 am

Hi, you can look at :
http://mypage.bluewin.ch/romanhartmann/perft.html (Roman web page also with divide. Roce can do some perft tests you may compare with your own results)
http://www.cs.berkeley.edu/~flab/chess/ ... games.html (page with high depth perft results from the starting position)
http://www.cs.berkeley.edu/~flab/chess/ ... games.html (Medioce chess blog)
Hope it helps,
yves

User avatar
hgm
Posts: 24740
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Perft Stats

Post by hgm » Sat Oct 13, 2007 8:40 am

Note that I still have an older perft code on my website that does give a break-down by move characteristic. (No checks, though. :( ) Unfortunately it is not able to read the initial position from a FEN, but has to have it hard-coded in the source, which makes it a bit cumbersome to use.

Code: Select all

$ ./perft11.exe
 - - - - - - - - - - - -
 - - - - - - - - - - - -
 - - R N B Q K B N R - -
 - - P P P P P P P P - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - p p p p p p p p - -
 - - r n b q k b n r - -
 - - - - - - - - - - - -
 - - - - - - - - - - - -


perft(1)=       20, x=     0, ep=     0, Q=     0, OO=     0 ( 0.000 sec)

perft(2)=      400, x=     0, ep=     0, Q=     0, OO=     0 ( 0.000 sec)

perft(3)=     8902, x=    34, ep=     0, Q=     0, OO=     0 ( 0.000 sec)

perft(4)=   197281, x=  1576, ep=     0, Q=     0, OO=     0 ( 0.020 sec)

perft(5)=  4865609, x= 82719, ep=   258, Q=     0, OO=     0 ( 0.340 sec)

perft(6)=119060324, x=2812008, ep=  5248, Q=     0, OO=     0 ( 8.612 sec)

$ gcc -O2 -mno-cygwin perft11.c

$ ./a
 - - - - - - - - - - - -
 - - - - - - - - - - - -
 - - R . . . K . . R - -
 - - P P P B B P P P - -
 - - . . N . . Q . p - -
 - - . p . . P . . . - -
 - - . . . P N . . . - -
 - - b n . . p n p . - -
 - - p . p p q p b . - -
 - - r . . . k . . r - -
 - - - - - - - - - - - -
 - - - - - - - - - - - -


perft(1)=       48, x=     8, ep=     0, Q=     0, OO=     2 ( 0.000 sec)

perft(2)=     2039, x=   351, ep=     1, Q=     0, OO=    91 ( 0.000 sec)

perft(3)=    97862, x= 17102, ep=    45, Q=     0, OO=  3162 ( 0.010 sec)

perft(4)=  4085603, x=757163, ep=  1929, Q= 15172, OO=128013 ( 0.290 sec)

perft(5)=193690690, x=35043416, ep= 73365, Q=  8392, OO=4993637 (13.259 sec)

User avatar
smrf
Posts: 484
Joined: Mon Mar 13, 2006 10:08 am
Location: Klein-Gerau, Germany
Contact:

Re: Perft Stats

Post by smrf » Sat Oct 13, 2007 12:26 pm

Here are my value tables:

Code: Select all

FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

  +-*--b--c--d--*--f--g--*-+ MS Vis.Studio C++ 32-Bit-Vers. 13.10
8 |[r][n][b][q][k][b][n][r]| (Compilation: Oct 13 2007)
7 |[p][p][p][p][p][p][p][p]|
6 |   :::   :::   :::   :::| Perft Testseries
5 |:::   :::   :::   :::   | (with TT caching +256.0 MB / 4-fold)
4 |   :::   :::   :::   :::| TT Access Success +53.0%
3 |:::   :::   :::   :::   |
2 |<P><P><P><P><P><P><P><P>| Smirf Test No.&#58;  0
1 |<R><N><B><Q><K><B><N><R>|
=>+-*--b--c--d--*--f--g--*-+ Break Time&#58; +10.00 Sec.

Ply      Nodes     all &#40;x&#41;     &#40;ep&#41;    all (+)      (#)  Prom.    Cstl.    Sec.
-------------------------------------------------------------------------------
1           20           0        0          0        0      0        0       0
2          400           0        0          0        0      0        0       0
3         8902          34        0         12        0      0        0       0
4       197281        1576        0        469        8      0        0       0
5      4865609       82719      258      27351      347      0        0   0.078
6    119060324     2812008     5248     809099    10828      0        0   1.188
7   3195901860   108329926   319617   33103848   435767      0   883453   15.06
-------------------------------------------------------------------------------


FEN&#58; r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 25

  +-*--b--c--d--*--f--g--*-+ MS Vis.Studio C++ 32-Bit-Vers. 13.10
8 |&#91;r&#93;&#58;&#58;&#58;   &#58;&#58;&#58;&#91;k&#93;&#58;&#58;&#58;   &#91;r&#93;| &#40;Compilation&#58; Oct 13 2007&#41;
7 |&#91;p&#93;   &#91;p&#93;&#91;p&#93;&#91;q&#93;&#91;p&#93;&#91;b&#93;   |
6 |&#91;b&#93;&#91;n&#93;   &#58;&#58;&#58;&#91;p&#93;&#91;n&#93;&#91;p&#93;&#58;&#58;&#58;| Perft Testseries
5 |&#58;&#58;&#58;   &#58;&#58;&#58;<P><N>   &#58;&#58;&#58;   | &#40;with TT caching +256.0 MB / 4-fold&#41;
4 |   &#91;p&#93;   &#58;&#58;&#58;<P>&#58;&#58;&#58;   &#58;&#58;&#58;| TT Access Success +51.0%
3 |&#58;&#58;&#58;   <N>   &#58;&#58;&#58;<Q>&#58;&#58;&#58;&#91;p&#93;|
2 |<P><P><P><B><B><P><P><P>| Smirf Test No.&#58;  1
1 |<R>   &#58;&#58;&#58;   <K>   &#58;&#58;&#58;<R>|
=>+-*--b--c--d--*--f--g--*-+ Break Time&#58; +10.00 Sec.

Ply     Nodes     all &#40;x&#41;     &#40;ep&#41;   all (+)     (#)     Prom.     Cstl.   Sec.
-------------------------------------------------------------------------------
1          48           8        0         0       0         0         2      0
2        2039         351        1         3       0         0        91      0
3       97862       17102       45       993       1         0      3162      0
4     4085603      757163     1929     25523      43     15172    128013  0.109
5   193690690    35043416    73365   3309887   30171      8392   4993637  3.156
6  8031647685  1558445089  3577504  92238050  360003  56627920 184513607  70.25
-------------------------------------------------------------------------------


FEN&#58; 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1

  +-a--b--c--d--e--f--g--h-+ MS Vis.Studio C++ 32-Bit-Vers. 13.10
8 |   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;| &#40;Compilation&#58; Oct 13 2007&#41;
7 |&#58;&#58;&#58;   &#91;p&#93;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
6 |   &#58;&#58;&#58;   &#91;p&#93;   &#58;&#58;&#58;   &#58;&#58;&#58;| Perft Testseries
5 |<K><P>&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;&#91;r&#93;| &#40;with TT caching +256.0 MB / 4-fold&#41;
4 |   <R>   &#58;&#58;&#58;   &#91;p&#93;   &#91;k&#93;| TT Access Success +71.0%
3 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
2 |   &#58;&#58;&#58;   &#58;&#58;&#58;<P>&#58;&#58;&#58;<P>&#58;&#58;&#58;| Smirf Test No.&#58;  2
1 |&#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   &#58;&#58;&#58;   |
=>+-a--b--c--d--e--f--g--h-+ Break Time&#58; +10.00 Sec.

Ply      Nodes     all &#40;x&#41;      &#40;ep&#41;     all (+)     (#)      Prom.Cstl.   Sec.
-------------------------------------------------------------------------------
1           14           1         0           2       0          0    0      0
2          191          14         0          10       0          0    0      0
3         2812         209         2         267       0          0    0      0
4        43238        3348       123        1680      17          0    0      0
5       674624       52051      1165       52950       0          0    0  0.016
6     11030083      940350     33325      452473    2733       7552    0  0.157
7    178633661    14519036    294874    12797406      87     140024    0  1.110
8   3009794393   267586558   8009239   135626805  450410    6578076    0  6.891
9  50086749815  4208748290  73050803  3440345177   42191  126512072    0  39.61
-------------------------------------------------------------------------------
Reinhard.

User avatar
hgm
Posts: 24740
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Perft Stats

Post by hgm » Sat Oct 13, 2007 12:42 pm

Indeed. I tested my perft initially against your results. I could confirm all the numbers you used to quote on you website (when it was still up). Except for the checks, which my perft doesn't count.

Post Reply