Skip to content

Commit

Permalink
Retire divide command
Browse files Browse the repository at this point in the history
The main purpose of perft is to help debugging. But without the breakdown in sum of perft(N-1), it is a
completely useless debugging tool.

So perft now displays the breakdown, and divide is therefore removed.

No functional change.
  • Loading branch information
lucasart committed Aug 4, 2014
1 parent 1b69910 commit 535f700
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void benchmark(const Position& current, istream& is) {

cerr << "\nPosition: " << i + 1 << '/' << fens.size() << endl;

if (limitType == "divide")
if (limitType == "perft")
for (MoveList<LEGAL> it(pos); *it; ++it)
{
StateInfo si;
Expand All @@ -148,12 +148,6 @@ void benchmark(const Position& current, istream& is) {
cerr << move_to_uci(*it, pos.is_chess960()) << ": " << cnt << endl;
nodes += cnt;
}
else if (limitType == "perft")
{
uint64_t cnt = Search::perft(pos, limits.depth * ONE_PLY);
cerr << "\nPerft " << limits.depth << " leaf nodes: " << cnt << endl;
nodes += cnt;
}
else
{
Threads.start_thinking(pos, limits, st);
Expand Down
2 changes: 1 addition & 1 deletion src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void UCI::loop(int argc, char* argv[]) {
else
Search::Limits.ponder = false;
}
else if (token == "perft" || token == "divide")
else if (token == "perft")
{
int depth;
stringstream ss;
Expand Down

0 comments on commit 535f700

Please sign in to comment.