From 535f70088e6fbf19f4775490edab050006734814 Mon Sep 17 00:00:00 2001 From: lucasart Date: Mon, 4 Aug 2014 13:54:09 +0800 Subject: [PATCH] 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. --- src/benchmark.cpp | 8 +------- src/uci.cpp | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 69bfc6c6..76a85a8c 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -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 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); diff --git a/src/uci.cpp b/src/uci.cpp index b82eeff5..6027295d 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -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; -- 2.39.2