Add perft 'divide' command

To show perft numbers for each move. Just
use 'divide' instead of 'perft', for instance:

position startpos moves e2e4 e7e5
divide 4

Inspired by Ronald de Man.

No functional change.
This commit is contained in:
Marco Costalba
2014-05-24 04:31:36 +02:00
parent 88b5100e29
commit e49eb67119
2 changed files with 16 additions and 3 deletions

View File

@@ -174,12 +174,14 @@ void UCI::loop(int argc, char* argv[]) {
else
Search::Limits.ponder = false;
}
else if (token == "perft" && (is >> token)) // Read perft depth
else if (token == "perft" || token == "divide")
{
int depth;
stringstream ss;
is >> depth;
ss << Options["Hash"] << " "
<< Options["Threads"] << " " << token << " current perft";
<< Options["Threads"] << " " << depth << " current " << token;
benchmark(pos, ss);
}