Best Perft() position

Discussion of chess software programming and technical issues.

Moderator: Ras

pinkfloydhomer

Best Perft() position

Post by pinkfloydhomer »

If you could only choose _one_ position for Perft()-ing, which one would it be?

I guess it would involve all sorts of moves from all sorts of pieces, including promotions, castling, en passant, pins, double checks, castlings that are illegal because the king is attacked, because the interim square is attacked or because the destination square is attacked, en passant captures that are illegal because the captured pawn blocks a check etc.

Gentlemen, gimme your best FENs :)
User avatar
Kempelen
Posts: 620
Joined: Fri Feb 08, 2008 10:44 am
Location: Madrid - Spain

Re: Best Perft() position

Post by Kempelen »

Try these:

r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
depth nodes totalnodes
1 48 48
2 2039 2087
3 97862 99949
4 4085603 4185552
5 193690690 197876242
6 8031647685 8229523927

n1n5/PPPk4/8/8/8/8/4Kppp/5N1N b - - 0 1
depth nodes totalnodes
1 24 24
2 496 520
3 9483 10003
4 182838 192841
5 3605103 3797944
6 71179139 74977083
Fermin Serrano
Author of 'Rodin' engine
http://sites.google.com/site/clonfsp/
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Best Perft() position

Post by wgarvin »

Kempelen wrote:Try these:

r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
depth nodes totalnodes
1 48 48
2 2039 2087
3 97862 99949
4 4085603 4185552
5 193690690 197876242
6 8031647685 8229523927
That first one you posted, is listed on the wiki on the Perft results page.

It lists the number of e.p. moves, castles, promotions, checks and checkmates at each ply (according to that page, this position has some of everything by depth 4)
pinkfloydhomer

Re: Best Perft() position

Post by pinkfloydhomer »

I propose something like this, as a first attempt:

r3k2r/pppp1ppp/1b3bnN/nP6/BBP1P3/q4NP1/P2P2PP/R2Q1RK1 w kq - 0 1

Although it doesn't test everything for both sides. Castling stuff is tested for black. Tricky illegal en passants are checked for white. I guess by starting out with white uncastled, this position would appear in the tree near the root and castling would also be tested for white. Back to the drawing board :)
pinkfloydhomer

Re: Best Perft() position

Post by pinkfloydhomer »

Forgot promotions in the last one.

I think this position covers most if not all of the tricky situations, although not the same situations for both sides. So the reversed position should probably be used as well:

r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq - 0 1
r2q1rk1/pP1p2pp/Q4n2/bbp1p3/Np6/1B3NBn/pPPP1PPP/R3K2R b KQ - 0 1

1: 6
2: 264
3: 9467
4: 422333
5: 15833292
6: 706045033