-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (24 loc) · 772 Bytes
/
main.cpp
File metadata and controls
26 lines (24 loc) · 772 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
#include "search.h"
#include "uci.h"
#include "ucioption.h"
#include <iostream>
#include <thread>
using namespace engine;
extern std::thread searchThread;
int main() {
options.add("Move Overhead", Option(10, 0, 1000));
options.add("Hash", Option(16, 1, 1 << 25, [](const Option &o) {
search::tt.resize((o.operator int()));
return std::nullopt;
}));
options.add("Clear Hash", Option(+[](const Option &) {
if (searchThread.joinable()) {
std::cout
<< "info string In search, do not modify hash table\n";
return std::nullopt;
}
search::tt.clear();
return std::nullopt;
}));
loop();
}