-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (30 loc) · 865 Bytes
/
Copy pathmain.cpp
File metadata and controls
35 lines (30 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream>
#include "board.h"
#include "attacks.h"
#include "magics.h"
#include "zobrist.h"
#include "tt.h"
#include "search.h"
#include "uci.h"
#include "datagen.h"
#include <string>
int main(int argc, char* argv[]) {
// Pickle relies on these tables mathematically mapping before booting
init_leapers();
init_sliders();
init_mvv_lva();
init_zobrist();
init_tt(32); // 32MB standard TT size
// Check for datagen CLI command
if (argc >= 4 && std::string(argv[1]) == "datagen") {
int games = std::stoi(argv[2]);
int depth = std::stoi(argv[3]);
std::string filename = (argc >= 5) ? argv[4] : "dataset.txt";
run_datagen(games, depth, filename);
return 0;
}
Board board;
// Hand over control to the Universal Chess Interface loop
uci_loop(board);
return 0;
}