kiwipete perft position

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: kiwipete perft position

Post by Henk »

By the way perft(4) = 4085603 for kiwipete position in Skipper so case closed.
Robert Pope
Posts: 558
Joined: Sat Mar 25, 2006 8:27 pm

Re: kiwipete perft position

Post by Robert Pope »

kiwipete is a good test position, but it is by no means complete. I would look at the link earlier and test all of them to make sure you have all the edge cases covered.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: kiwipete perft position

Post by Henk »

Skipper gives castling rights depending on rook number. So the position below might give a problem. Skipper gives perft(4) = 265703

[d] rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k - 0 1
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: kiwipete perft position

Post by Henk »

Henk wrote:Skipper gives castling rights depending on rook number. So the position below might give a problem. Skipper gives perft(4) = 265703

[d] rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k - 0 1
ai. stockfish_14053109_x64_modern.exe gives 266260
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: kiwipete perft position

Post by Henk »

Henk wrote:
Henk wrote:Skipper gives castling rights depending on rook number. So the position below might give a problem. Skipper gives perft(4) = 265703

[d] rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k - 0 1
ai. stockfish_14053109_x64_modern.exe gives 266260
Enough of it. I have to rewrite it all. Rook numbers make no sense and should be removed. Only thing that matters if black or white can castle short or long.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: kiwipete perft position

Post by zullil »

Henk wrote:
Henk wrote:
Henk wrote:Skipper gives castling rights depending on rook number. So the position below might give a problem. Skipper gives perft(4) = 265703

[d] rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k - 0 1
ai. stockfish_14053109_x64_modern.exe gives 266260
Enough of it. I have to rewrite it all. Rook numbers make no sense and should be removed. Only thing that matters if black or white can castle short or long.
Mine agrees with SF:

Code: Select all

FEN string = rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k -
Depth = 4
Leaf nodes = 266260
Time taken = 10 ms
Yes, starting Skipper over from scratch seems sensible. Sounds like your entire design is needlessly complicated.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: kiwipete perft position

Post by Henk »

zullil wrote:
Henk wrote:
Henk wrote:
Henk wrote:Skipper gives castling rights depending on rook number. So the position below might give a problem. Skipper gives perft(4) = 265703

[d] rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k - 0 1
ai. stockfish_14053109_x64_modern.exe gives 266260
Enough of it. I have to rewrite it all. Rook numbers make no sense and should be removed. Only thing that matters if black or white can castle short or long.
Mine agrees with SF:

Code: Select all

FEN string = rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k -
Depth = 4
Leaf nodes = 266260
Time taken = 10 ms
Yes, starting Skipper over from scratch seems sensible. Sounds like your entire design is needlessly complicated.
Yes but the author does not change. So it might become crap again sooner or later.

When computing perft(3) after Rh1-h2 Skipper gives wrong perft(2) after Rf8-f1 that is 106. But if I compute the perft(2) from the fen of the position after Rh1-h2, Rf8-f1 it gives 108 which is ok. riddle riddle.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: kiwipete perft position

Post by Henk »

So in this position according to Skipper perft(3) = 37159 which should be 37239. And perft divide (3) gives 106 after f8-f1 which should be 108.

[d] rrrrkr1r/rr1rr3/8/8/8/8/7R/6K1 b k - 0

But in the position below Skipper computes perf(2) = 108 ?? Which is correct.

[d] rrrrk2r/rr1rr3/8/8/8/8/7R/5rK1 w k - 0 1

So perhaps after f8-f1 Skipper still thinks it can't castle short when it uses the fen of the first position,
User avatar
Ajedrecista
Posts: 1966
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Position with eleven rocks.

Post by Ajedrecista »

Hello:
Henk wrote:Skipper gives castling rights depending on rook number. So the position below might give a problem. Skipper gives perft(4) = 265703

[d] rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k - 0 1

Code: Select all

rrrrkr1r/rr1rr3/8/8/8/8/8/6KR w k - 0 1

Results by JetChess 1.0.0.0:

perft(1) =                 8
perft(2) =               388
perft(3) =             4,827
perft(4) =           266,260
perft(5) =         2,955,677
perft(6) =       174,627,748
perft(7) =     1,941,335,854
perft(8) =   120,165,734,022
perft(9) = 1,335,631,917,716
I hope no typos. Good luck with your debug!

Regards from Spain.

Ajedrecista.
koedem
Posts: 105
Joined: Fri Mar 18, 2016 10:45 pm

Re: kiwipete perft position

Post by koedem »

That's an interesting position. My freshly implemented perft worked for all positions on the cpw except this one where on perft 4 it gave exactly 4 nodes too many which seemed like an oddly small number to be off.

As it turns out I somehow didn't clear e.p. rights when castling which gave the exact line 1.a4 either castling 2.either castling bxa4 e.p. for 4 extra nodes...