forked from gekkehenker/fire
-
Notifications
You must be signed in to change notification settings - Fork 2
/
uci.h
48 lines (40 loc) · 1.77 KB
/
uci.h
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
/*
Fire is a freeware UCI chess playing engine authored by Norman Schmidt.
Fire utilizes many state-of-the-art chess programming ideas and techniques
which have been documented in detail at https://www.chessprogramming.org/
and demonstrated via the very strong open-source chess engine Stockfish...
https://github.com/official-stockfish/Stockfish.
Fire is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version.
You should have received a copy of the GNU General Public License with
this program: copying.txt. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <sstream>
#include "position.h"
// UCI option default values
static std::string startpos = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
static int uci_hash = 64;
static int uci_threads = 1;
static int uci_multipv = 1;
static int uci_contempt = 0;
static bool uci_ponder = false;
static bool uci_chess960 = false;
static bool uci_syzygy_50_move_rule = false;
static int uci_syzygy_probe_depth = 1;
static int uci_syzygy_probe_limit = 6;
static std::string uci_search = "alphabeta";
static std::string uci_syzygy_path = "";
inline bool bench_active = false;
// function declarations
void init(int hash_size);
void new_game();
void uci_loop(int argc, char* argv[]);
void set_position(position& pos, std::istringstream& is);
void set_option(std::istringstream& input);
void go(position& pos, std::istringstream& is);
void bench(int depth);
std::string trim(const std::string& str, const std::string& whitespace = " \t");
std::string sq(square sq);
std::string print_pv(const position& pos, int alpha, int beta, int active_pv, int active_move);