1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Retire divide command

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.
This commit is contained in:
lucasart 2014-08-04 13:54:09 +08:00
parent 1b69910865
commit 535f70088e
2 changed files with 2 additions and 8 deletions

View file

@ -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;
@ -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);

View file

@ -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;