- limits.time = time[pos.side_to_move()];
- limits.increment = inc[pos.side_to_move()];
-
- Threads.start_thinking(pos, limits, searchMoves, true);
- }
-
-
- // perft() is called when engine receives the "perft" command. The function
- // calls perft() with the required search depth then prints counted leaf nodes
- // and elapsed time.
-
- void perft(Position& pos, istringstream& is) {
-
- int depth, time;
-
- if (!(is >> depth))
- return;
-
- time = system_time();
-
- int64_t n = Search::perft(pos, depth * ONE_PLY);
-
- time = system_time() - time;
-
- std::cout << "\nNodes " << n
- << "\nTime (ms) " << time
- << "\nNodes/second " << int(n / (time / 1000.0)) << std::endl;
+ Threads.start_searching(pos, limits, searchMoves, SetupStates);