Documentation ¶
Overview ¶
Perft is a perft tool.
Perft's main purpose is to test, debug and benchmark move generation. To do this we count number of nodes, captures, en passant, castles and promotions for given depths (usually small 4-7) from specific position. In order to aid debugging debugging pertf can do split up to any level.
For more results and test description see:
https://chessprogramming.wikispaces.com/Perft https://chessprogramming.wikispaces.com/Perft+Results http://www.10x8.net/chess/PerfT.html
Installation using the go tool
$ go get -u bitbucket.org/zurichess/tools/perft
Examples:
Simple fast integration test:
$ go test bitbucket.org/zurichess/tools/perft
Testing any fen:
$ ./perft --fen "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" --max_depth 7 Searching FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" depth nodes captures enpassant castles promotions eval KNps elapsed -----+------------+----------+---------+---------+----------+-----+------+------- 1 20 0 0 0 0 good 154 129.948µs 2 400 0 0 0 0 good 158 2.531444ms 3 8902 34 0 0 0 good 266 33.494604ms 4 197281 1576 0 0 0 good 3454 57.114844ms 5 4865609 82719 258 0 0 good 12141 400.762477ms 6 119060324 2812008 5248 0 0 good 24027 4.955285846s 7 3195901860 108329926 319617 883453 0 good 40040 1m19.817376124s
startpos:
$ ./perft --fen startpos --max_depth 7 Searching FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" depth nodes captures enpassant castles promotions eval KNps elapsed -----+------------+----------+---------+---------+----------+-----+------+------- 1 20 0 0 0 0 good 154 129.948µs 2 400 0 0 0 0 good 158 2.531444ms 3 8902 34 0 0 0 good 266 33.494604ms 4 197281 1576 0 0 0 good 3454 57.114844ms 5 4865609 82719 258 0 0 good 12141 400.762477ms 6 119060324 2812008 5248 0 0 good 24027 4.955285846s 7 3195901860 108329926 319617 883453 0 good 40040 1m19.817376124s
kiwipete:
$ ./perft --fen kiwipete --max_depth 6 Searching FEN "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1" depth nodes captures enpassant castles promotions eval KNps elapsed -----+------------+----------+---------+---------+----------+-----+------+------- 1 48 8 0 2 0 good 311 154.233µs 2 2039 351 1 91 0 good 267 7.648547ms 3 97862 17102 45 3162 0 good 1259 77.709405ms 4 4085603 757163 1929 128013 15172 good 11099 368.115794ms 5 193690690 35043416 73365 4993637 8392 good 20369 9.508896954s 6 8031647685 1558445089 3577504 184513607 56627920 good 27478 4m52.289206499s
duplain:
$ ./perft --fen duplain --max_depth 7 Searching FEN "8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1" depth nodes captures enpassant castles promotions eval KNps elapsed -----+------------+----------+---------+---------+----------+-----+------+------- 1 14 1 0 0 0 good 100 140.46µs 2 191 14 0 0 0 good 115 1.662379ms 3 2812 209 2 0 0 good 137 20.457747ms 4 43238 3348 123 0 0 good 937 46.124066ms 5 674624 52051 1165 0 0 good 14036 48.065305ms 6 11030083 940350 33325 0 7552 good 28502 386.996491ms 7 178633661 14519036 294874 0 140024 good 72956 2.448514893s
Click to show internal directories.
Click to hide internal directories.