- Threads.init();
-
- if (argc < 2)
- {
- cout << engine_name() << " by " << engine_authors() << endl;
- uci_loop();
- }
- else if (string(argv[1]) == "bench")
- benchmark(argc, argv);
-
- else
- cout << "Usage: stockfish bench [hash size = 128] [threads = 1] "
- << "[limit = 12] [fen positions file = default] "
- << "[limited by depth, time, nodes or perft = depth]" << endl;
-
- Threads.exit();
+ Pawns::init();
+ Tablebases::init(Options["SyzygyPath"]);
+ TT.resize(Options["Hash"]);
+ Threads.set(Options["Threads"]);
+ Search::clear(); // After threads are up
+
+ UCI::loop(argc, argv);
+
+ Threads.set(0);