forked from Concept-Bytes/Open-Chess
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstockfish_settings.h
More file actions
49 lines (42 loc) · 1.16 KB
/
Copy pathstockfish_settings.h
File metadata and controls
49 lines (42 loc) · 1.16 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef STOCKFISH_SETTINGS_H
#define STOCKFISH_SETTINGS_H
// Stockfish Engine Settings
struct StockfishSettings {
int depth = 12; // Search depth (1-15, higher = stronger but slower)
int timeoutMs = 30000; // API timeout in milliseconds (30 seconds)
bool useBook = true; // Use opening book for first moves
int maxRetries = 3; // Max API call retries on failure
// Difficulty presets
static StockfishSettings easy() {
StockfishSettings s;
s.depth = 6;
s.timeoutMs = 15000;
return s;
}
static StockfishSettings medium() {
StockfishSettings s;
s.depth = 6;
s.timeoutMs = 25000;
return s;
}
static StockfishSettings hard() {
StockfishSettings s;
s.depth = 14;
s.timeoutMs = 45000;
return s;
}
static StockfishSettings expert() {
StockfishSettings s;
s.depth = 16;
s.timeoutMs = 60000;
return s;
}
};
// Bot difficulty levels
enum BotDifficulty {
BOT_EASY = 1,
BOT_MEDIUM = 2,
BOT_HARD = 3,
BOT_EXPERT = 4
};
#endif