- Position pos(*it);
- cout << "\nProcessing position " << cnt << '/' << positions.size() << endl << endl;
- if (!think(pos, true, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves))
- break;
- totalNodes += nodes_searched();
+ Position pos(*it, 0);
+ cerr << "\nBench position: " << cnt << '/' << positions.size() << endl << endl;
+ if (limitType == "perft")
+ {
+ int64_t perftCnt = perft(pos, maxDepth * OnePly);
+ cerr << "\nPerft " << maxDepth << " result (nodes searched): " << perftCnt << endl << endl;
+ totalNodes += perftCnt;
+ } else {
+ if (!think(pos, false, false, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves))
+ break;
+ totalNodes += nodes_searched();
+ }