mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08: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:
@@ -138,7 +138,7 @@ void benchmark(const Position& current, istream& is) {
|
|||||||
|
|
||||||
cerr << "\nPosition: " << i + 1 << '/' << fens.size() << endl;
|
cerr << "\nPosition: " << i + 1 << '/' << fens.size() << endl;
|
||||||
|
|
||||||
if (limitType == "divide")
|
if (limitType == "perft")
|
||||||
for (MoveList<LEGAL> it(pos); *it; ++it)
|
for (MoveList<LEGAL> it(pos); *it; ++it)
|
||||||
{
|
{
|
||||||
StateInfo si;
|
StateInfo si;
|
||||||
@@ -148,12 +148,6 @@ void benchmark(const Position& current, istream& is) {
|
|||||||
cerr << move_to_uci(*it, pos.is_chess960()) << ": " << cnt << endl;
|
cerr << move_to_uci(*it, pos.is_chess960()) << ": " << cnt << endl;
|
||||||
nodes += cnt;
|
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
|
else
|
||||||
{
|
{
|
||||||
Threads.start_thinking(pos, limits, st);
|
Threads.start_thinking(pos, limits, st);
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ void UCI::loop(int argc, char* argv[]) {
|
|||||||
else
|
else
|
||||||
Search::Limits.ponder = false;
|
Search::Limits.ponder = false;
|
||||||
}
|
}
|
||||||
else if (token == "perft" || token == "divide")
|
else if (token == "perft")
|
||||||
{
|
{
|
||||||
int depth;
|
int depth;
|
||||||
stringstream ss;
|
stringstream ss;
|
||||||
|
|||||||
Reference in New Issue
Block a user