Perishing Perft !

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

GeoffW

Perishing Perft !

Post by GeoffW »

Hi

I have got some peft bugs I need to fix. Can someone remind me please which freeware engines can print out detailed Peft results split into #ep moves, #castle moves, #standard moves etc etc ?

[D]r3k2r/p6p/8/8/8/8/P6P/R3K2R w - - 0 1

Using the position above, I have managed to put in a lovely bug where I see a discrepancy of +2 moves only at Perft 7

raw:14 end:14 secs:0.00
raw:206 end:192 secs:0.00
raw:3672 end:3466 secs:0.00
raw:63792 end:60120 secs:0.02 nps:3987000
raw:1287576 end:1223784 secs:0.33 nps:3925537
raw:25449546 end:24161970 secs:6.78 nps:3753067
raw:553838207 end:528388661 secs:216.25 nps:2561102 <---- GRRR

Can anyone confirm this is out by +2 ?

I cant see what it is so far that would give such a small error of just 2 moves. I dont think it can be due to ep moves or castling moves, so my best guess is a promote bug as white pawns would be on rank 7 by perft 7

Regards Geoff
Allard Siemelink
Posts: 297
Joined: Fri Jun 30, 2006 9:30 pm
Location: Netherlands

Re: Perishing Perft !

Post by Allard Siemelink »

What castling moves, according to fen there are none?

I get this:

Code: Select all

perft 1=      14 ops in 0.000 seconds  ops/ms=      1,  ticks/op=    0
perft 2=     192 ops in 0.000 seconds  ops/ms=      1,  ticks/op=    0
perft 3=    3466 ops in 0.000 seconds  ops/ms=      1,  ticks/op=    0
perft 4=   60120 ops in 0.000 seconds  ops/ms=      1,  ticks/op=    0
perft 5= 1223784 ops in 0.094 seconds  ops/ms=  13019,  ticks/op=  192
perft 6=24161970 ops in 1.625 seconds  ops/ms=  14869,  ticks/op=  168
Allard Siemelink
Posts: 297
Joined: Fri Jun 30, 2006 9:30 pm
Location: Netherlands

Re: Perishing Perft !

Post by Allard Siemelink »

Allard Siemelink wrote:What castling moves, according to fen there are none?
Sorry, I looked at your raw numbers, here's perft 7 as well:

Code: Select all

perft 7=528388659 ops in 34.922 seconds  ops/ms=  15131,  ticks/op=  165
Indeed it is off by two. Unfortunately my engine is not free...
pijl

Re: Perishing Perft !

Post by pijl »

GeoffW wrote: raw:553838207 end:528388661 secs:216.25 nps:2561102 <---- GRRR

Can anyone confirm this is out by +2 ?
Yes, I can. CTD says 528388659.
Richard.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Perishing Perft !

Post by sje »

Code: Select all

&#91;&#93; emp 7
Kd1 21,704,666
Kd2 52,542,952
Ke2 59,615,160
Kf1 20,933,844
Kf2 51,601,182
Rb1 50,081,018
Rc1 47,457,788
Rd1 33,831,669
Rf1 36,304,708
Rg1 51,302,720
a3 23,941,522
a4 26,931,187
h3 24,346,577
h4 27,793,666
Pathway count to depth seven&#58; 528,388,659
Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Perishing Perft !

Post by Uri Blass »

GeoffW wrote:Hi

I have got some peft bugs I need to fix. Can someone remind me please which freeware engines can print out detailed Peft results split into #ep moves, #castle moves, #standard moves etc etc ?

[D]r3k2r/p6p/8/8/8/8/P6P/R3K2R w - - 0 1

Using the position above, I have managed to put in a lovely bug where I see a discrepancy of +2 moves only at Perft 7

raw:14 end:14 secs:0.00
raw:206 end:192 secs:0.00
raw:3672 end:3466 secs:0.00
raw:63792 end:60120 secs:0.02 nps:3987000
raw:1287576 end:1223784 secs:0.33 nps:3925537
raw:25449546 end:24161970 secs:6.78 nps:3753067
raw:553838207 end:528388661 secs:216.25 nps:2561102 <---- GRRR

Can anyone confirm this is out by +2 ?

I cant see what it is so far that would give such a small error of just 2 moves. I dont think it can be due to ep moves or castling moves, so my best guess is a promote bug as white pawns would be on rank 7 by perft 7

Regards Geoff
free movei does not do it but it can give you important details

Here is what movei prints in console mode(I entered the first 2 lines and movei generated the rest of the lines)

setboard r3k2r/p6p/8/8/8/8/P6P/R3K2R w - - 0 1
perft 7


a2a3 23941522
a2a4 26931187
h2h3 24346577
h2h4 27793666
a1b1 50081018
a1c1 47457788
a1d1 33831669
h1g1 51302720
h1f1 36304708
e1f1 20933844
e1d1 21704666
e1e2 59615160
e1f2 51601182
e1d2 52542952
perft(7) = 528388659,time=2891
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Perishing Perft !

Post by hgm »

On my website there is a specialized perft program that you can give a FEN as an argument in the command line, and which can give output split to any level:

http://home.hccnet.nl/h.g.muller/perft.c
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Perishing Perft !

Post by sje »

Code: Select all

&#91;&#93; emp 8
Kd1 471,895,061
Kd2 1,138,087,181
Ke2 1,299,305,185
Kf1 452,781,746
Kf2 1,109,817,568
Rb1 1,062,390,196
Rc1 994,961,141
Rd1 699,902,214
Rf1 749,864,388
Rg1 1,078,224,310
a3 521,883,593
a4 584,490,738
h3 530,959,096
h4 602,822,744
Pathway count to depth eight&#58; 11,297,385,161
Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Perishing Perft !

Post by Uri Blass »

sje wrote:

Code: Select all

&#91;&#93; emp 8
Kd1 471,895,061
Kd2 1,138,087,181
Ke2 1,299,305,185
Kf1 452,781,746
Kf2 1,109,817,568
Rb1 1,062,390,196
Rc1 994,961,141
Rd1 699,902,214
Rf1 749,864,388
Rg1 1,078,224,310
a3 521,883,593
a4 584,490,738
h3 530,959,096
h4 602,822,744
Pathway count to depth eight&#58; 11,297,385,161
correct
results of movei:

setboard r3k2r/p6p/8/8/8/8/P6P/R3K2R w - - 0 1
perft 8
a2a3 521883593
a2a4 584490738
h2h3 530959096
h2h4 602822744
a1b1 1062390196
a1c1 994961141
a1d1 699902214
h1g1 1078224310
h1f1 749864388
e1f1 452781746
e1d1 471895061
e1e2 1299305185
e1f2 1109817568
e1d2 1138087181
perft(8) = 11297385161,time=23531
perft 9
h2h3 11307295010
h2h4 13174065453
a2a3 11045902862
a2a4 12585720147
a1b1 25387312269
a1c1 23604805814
a1d1 16224436570
h1g1 26528861442
h1f1 18108686447
e1f1 9471852362
e1d1 10058850787
e1e2 30443022291
e1f2 25682033541
e1d2 26426792221
perft(9) = 260049637216,time=164953
Alessandro Scotti

Re: Perishing Perft !

Post by Alessandro Scotti »

Amazing how fast Movei is, latest Hamsters (with hash table) takes 61 secs for perft 8 on my Mac Mini.

Quick Perft is also very fast IIRC but on same Mac (compiled on the fly with a simple gcc -O3) it cannot complete without a hash table and takes 25 secs just to reach perft 7.