mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03: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:
parent
1b69910865
commit
535f70088e
2 changed files with 2 additions and 8 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue