You can download the source code by clicking the "snapshot" link next to the latest commit.
I'm developing a cross-platform chess gui for 8x8 and 10x8 variants with a friend. We of course needed an easy-to-use, flexible internal chessboard module or class to support all the variants, and a good debugging tool for it. I couldn't find a perft utility which could handle FRC, Capablanca chess, Capablanca Random chess, or Gothic chess positions, so I wrote one myself, called Omniperft.
I'm still a bit new to C++, so this was a good opportunity to try to forget about my C habits and do things the C++ way. And if you're wondering why the header files are packed so full of documentation, it's because we're using Doxygen to generate automatic API docs.
It's pretty simple to use, and has only the following commands (no command line arguments):
Code: Select all
moves Print a list of legal moves
perft [d] Print a perft value to depth [d]
divide [d] Perft to [d] with a separate count for each move
printboard Print an ASCII board and the FEN/X-FEN string
quit Exit the program
undo Reverse the last move
setboard [fen] Set the board according to a FEN/X-FEN string
[move] Make [move] on the board. Accepts SAN and Coordinate notation
Code: Select all
setboard rnbqckabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQCKABNR w KQkq -
perft 5
- Could someone test Omniperft with more Capablanca/Gothic positions? I only found a couple of reference figures on R. Scharnagl's site.
- Can I get a decent Windows build of this? I don't know why, but my MSVC builds are sluggish.
Here's what I mean by sluggish:
Perft(7) of initial chess position:
- Linux 64-bit (compiled with GCC): 105 seconds
- Windows 32-bit (compiled with MinGW): 186 seconds
- Windows 32-bit (compiled with MSVC): 257 seconds
The board representation doesn't use bitboards, so the speed gap between 32-bit and 64-bit shouldn't be that huge.