- init_uci_options();
- Position::init_zobrist();
- Position::init_piece_square_tables();
- MovePicker::init_phase_table();
- init_eval(1);
- init_bitbases();
- init_threads();
-
- // Make random number generation less deterministic, for book moves
- for (int i = abs(get_system_time() % 10000); i > 0; i--)
- genrand_int32();
-
- // Process command line arguments
- if (argc >= 2 && string(argv[1]) == "bench")
- {
- if (argc < 4 || argc > 6)
- {
- std::cout << "Usage: glaurung bench <hash size> <threads> "
- << "[time = 60s] [fen positions file = default]"
- << std::endl;
- exit(0);
- }
- string time = argc > 4 ? argv[4] : "60";
- string fen = argc > 5 ? argv[5] : "default";
- benchmark(string(argv[2]) + " " + string(argv[3]) + " " + time + " " + fen);
- return 0;
- }