marcelk wrote:sje wrote:My soon-to-be-released BozoChess program has a built-in self test routine which includes a set of perft test positions. Each position is sent to the perft bulk counter for depths of one to three ply and the results are checked against known values. Since the bulk counter can do move than ten million positions per second on my iMac, there is no noticeable time take during program initialization to run the self test.
But I have only a few positions and would like to add more, and so I'm looking for suggestions.
I have a set
here of 6000+ positions with perft 1-6.
I generated the set by playing random games upto some randomized game length, and recorded the position every 3 half moves.
The counts have been reproduced by 3 different engines (all by me though).
The last engine perft bug I uncovered was in position 403. It was my goal to have a set that is large enough so that it would expose all new bugs within the first 10% and that the remaining 90% is there for confidence. (That means: if I would find a new bug in that 90% part and not earlier, the set would have to be increased).
I've recently started looking at Djinn again and as part of the neural reboot I decided to add some new interface commands. One of the classics that everyone else seems to have is the 'divide' command, which is used to debug perft problems. Interestingly, during this process I was able to fully use it because I ran across a castling bug

, which I've since fixed. To really bang on the move generator I ran through all the perft test positions I could find online (at the wiki, etc.) plus all 6838! perft positions from Marcel's website and my numbers agree with his. If anyone is interested I converted all the positions to something a bit more digestable, so that the file now has the format:
Code: Select all
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 ;D1 20 ;D2 400 ;D3 8902 ;D4 197281 ;D5 4865609 ;D6 119060324
rnbqkbnr/pp1ppppp/2p5/8/6P1/2P5/PP1PPP1P/RNBQKBNR b KQkq - 0 1 ;D1 21 ;D2 463 ;D3 11138 ;D4 274234 ;D5 7290026 ;D6 195464529
rnb1kbnr/ppq1pppp/2pp4/8/6P1/2P5/PP1PPPBP/RNBQK1NR w KQkq - 0 1 ;D1 27 ;D2 734 ;D3 20553 ;D4 579004 ;D5 16988496 ;D6 494216738
etc.
I can make it available at my web page if anyone is interested.
Here's the perft counts according to the perl script I hacked together two seconds ago.
D1 sum = 178,742
D2 sum = 4,689,446
D3 sum = 139,639,907
D4 sum = 4,135,458,706
D5 sum = 132,117,547,121
D6 sum = 4,185,882,506,133
Total = 4,322,280,020,055
Yes, that's over
4 TRILLION positions!
BTW, one thing I noticed when debugging this, is that no other program I tried orders the output of the 'divide' command by either the move name or even more useful, by the move counts. Obviously, this is solved with a simple sort, but it would be nice if that was done automatically. The move count is the better choice (IMO), because none of the programs put out a standard move format. Some produced short SAN, others long SAN, some from-to square algebraic etc. The move counts were (generally) the same.
regards,
--tom