X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=d79726497e085d3bef9d0f80b695a9b4d54b405b;hp=b90d3fcb151f6172f7ea22a2b81d766778acd050;hb=dd5a3ae4a6c7cc4adcbb4b72378694b0889139d7;hpb=2b32571de88837ef5739348b8a3c951590a94205 diff --git a/src/benchmark.cpp b/src/benchmark.cpp index b90d3fcb..d7972649 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -104,7 +104,7 @@ void benchmark(const string& commandLine) { if (limitType == "time") secsPerPos = val * 1000; - else if (limitType == "depth") + else if (limitType == "depth" || limitType == "perft") maxDepth = val; else maxNodes = val; @@ -153,7 +153,9 @@ void benchmark(const string& commandLine) { int dummy[2] = {0, 0}; Position pos(*it); cerr << "\nBench position: " << cnt << '/' << positions.size() << endl << endl; - if (!think(pos, true, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves)) + if (limitType == "perft") + totalNodes += perft(pos, maxDepth * OnePly); + else if (!think(pos, true, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves)) break; totalNodes += nodes_searched(); }