Perft 12 in progress

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Partial results posted

Post by sje »

For the purposes of movepath enumeration, two positions are the same if the subtrees are the same.

Strictly speaking, a non-nil en passant target square should not appear in a FEN record unless there is at least one en passant capture available.
SuneF
Posts: 127
Joined: Thu Sep 17, 2009 11:19 am

Re: Partial results posted

Post by SuneF »

sje wrote:For the purposes of movepath enumeration, two positions are the same if the subtrees are the same.

Strictly speaking, a non-nil en passant target square should not appear in a FEN record unless there is at least one en passant capture available.
I agree, I just thought maybe you didn't. There are some places where an ep square is in the FEN even when no ep is possible. This is wrong I think because that would create two different FENs for what is the exact same position with respect to the subtree (ignoring 50 move rule).

I based the stats on the FENs directly, didn't trust the hash.
I cannot 100% rule out there is a problem with the FENs of course, but then who cares as long as the internal move gen is correct.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Partial results posted

Post by sje »

Give me a few minutes and I'll code up a Perft/disticnt FEN file writer and post the results.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Distinct FEN results

Post by sje »

Okay, I've got some results.

Go to https://public.me.com/chessnotation and look in the DistinctFEN directory. You'll find a collection of text files for various Perft depths. For each file, the first six fields on each line form a distinct FEN position for that depth; the seventh field is the number of times the position occurs.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Distinct FEN results

Post by sje »

And if you have a Unix-like system, you can sort the supplied text files with:

Code: Select all

sort -r -g -k 7,7 <unsorted.txt >sorted.txt
Substitute file names as needed. Omit the "-r" for an ascending sort.

For the Perft(5) file, the command

Code: Select all

sort -r -g -k 7,7 <emp5.txt | head -1
gives:

Code: Select all

rnbqkbr1/pppppppp/7n/8/8/4P3/PPPP1PPP/RNBQKBNR b KQq - 0 3 15
That's:
[D]rnbqkbr1/pppppppp/7n/8/8/4P3/PPPP1PPP/RNBQKBNR b KQq - 0 3
And it (along with many others) occurs 15 times in the full tree.
SuneF
Posts: 127
Joined: Thu Sep 17, 2009 11:19 am

Re: Distinct FEN results

Post by SuneF »

sje wrote:Okay, I've got some results.

Go to https://public.me.com/chessnotation and look in the DistinctFEN directory. You'll find a collection of text files for various Perft depths. For each file, the first six fields on each line form a distinct FEN position for that depth; the seventh field is the number of times the position occurs.
Nice i'll have a look.

I think I found the problem though. SQL Server defaults to case INsensitive string compare *doh*. Some FENs with black/white pawns will become indistinguishable. Running it again, case sensitive this time. Perft 5 now matches your number, so I'm guessing perft 6 will as well though it takes a few hours to plow through 10 gigs of ascii data on my laptop...
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Perft(11) after 1 f3

Post by sje »

Code: Select all

&#91;&#93; df &#40;f3&#41;
rnbqkbnr/pppppppp/8/8/8/5P2/PPPPP1PP/RNBQKBNR b KQkq - 0 1
&#91;&#93; emptran 11
Na6 52,814,502,311,132
Nc6 69,346,836,869,504
Nh6 52,862,680,234,277
Nf6 67,072,751,477,503
a6 45,392,074,795,061
a5 64,104,912,785,871
b5 60,633,343,660,480
b6 59,620,299,741,660
c5 78,517,163,488,187
c6 68,464,224,447,495
d6 116,603,059,750,585
d5 160,219,299,125,667
e5 171,608,318,607,072
f5 52,283,241,875,269
f6 41,111,284,537,604
e6 161,206,354,078,035
g5 58,408,803,102,889
g6 61,886,478,213,507
h6 45,362,706,789,609
h5 65,340,522,555,012
Depth&#58; 11   Count&#58; 1,552,858,858,446,419   Elapsed&#58; 367715  &#40;4.223e+09 Hz / 2.36798e-10 s&#41;
13 down, 7 to go. (d4 e4 f4) in progress.

Perft(12) total so far: 38,062,411,222,574,678
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Post subject: Perft(11) after 1 f4

Post by sje »

Code: Select all

&#91;&#93; df &#40;f4&#41;
rnbqkbnr/pppppppp/8/8/5P2/8/PPPPP1PP/RNBQKBNR b KQkq - 0 1
&#91;&#93; emptran 11
Na6 68,769,052,079,500
Nh6 67,831,080,969,382
Nf6 88,094,345,261,522
Nc6 90,452,720,906,517
a6 59,274,858,350,294
b5 79,035,502,727,828
a5 83,490,822,243,285
b6 78,208,195,597,191
c5 100,426,318,478,322
c6 89,073,781,956,231
d6 146,946,105,539,601
f5 51,451,345,032,010
f6 50,932,537,770,092
d5 203,227,089,554,421
g5 93,418,107,742,001
g6 82,059,877,870,086
h6 58,618,161,993,812
h5 85,205,287,829,675
e6 210,673,252,801,486
e5 263,580,357,905,865
Depth&#58; 11   Count&#58; 2,050,768,802,609,121   Elapsed&#58; 259852  &#40;7.89206e+09 Hz / 1.2671e-10 s&#41;
14 down, 6 to go. Much time has been lost due to power outages.

Perft(12) total so far: 40,113,180,025,183,799
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Post subject: Post subject: Perft(11) after 1 g3

Post by sje »

Code: Select all

&#91;&#93; df &#40;g3&#41;
rnbqkbnr/pppppppp/8/8/8/6P1/PPPPPP1P/RNBQKBNR b KQkq - 0 1
&#91;&#93; emptran 11
Na6 83,531,892,698,009
Nh6 84,396,415,977,443
Nf6 106,314,238,303,473
Nc6 108,188,016,556,602
a6 71,687,959,685,730
b5 96,937,643,533,392
b6 95,410,047,910,027
a5 101,143,479,417,071
c5 122,476,858,285,782
c6 108,065,973,644,676
d6 178,550,417,555,891
f5 81,719,890,071,911
d5 244,765,168,230,904
f6 61,073,379,996,908
g5 87,113,692,726,148
g6 98,450,494,010,483
h6 71,472,940,687,713
h5 104,638,412,988,316
e5 300,345,292,387,514
e6 292,317,793,673,444
Depth&#58; 11   Count&#58; 2,498,600,008,341,437   Elapsed&#58; 302698  &#40;8.25444e+09 Hz / 1.21147e-10 s&#41;
15 down, 5 to go.

Perft(12) total so far: 42,611,780,033,525,236
FlavusSnow
Posts: 89
Joined: Thu Apr 01, 2010 5:28 am
Location: Omaha, NE

Re: Perft 12 in progress

Post by FlavusSnow »

What software do you run for this? Is it an engine, or a specialized perft app?

does anyone know what engine would have the fastest perft?