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.
cerr << "\nPosition: " << i + 1 << '/' << fens.size() << endl;
- if (limitType == "divide")
+ if (limitType == "perft")
for (MoveList<LEGAL> it(pos); *it; ++it)
{
StateInfo si;
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);
else
Search::Limits.ponder = false;
}
- else if (token == "perft" || token == "divide")
+ else if (token == "perft")
{
int depth;
stringstream ss;