forked from QueensGambit/CrazyAra
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.h
89 lines (76 loc) · 2.52 KB
/
constants.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
CrazyAra, a deep learning chess variant engine
Copyright (C) 2018 Johannes Czech, Moritz Willig, Alena Beyer
Copyright (C) 2019-2020 Johannes Czech
This program 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
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/*
* @file: constants.h
* Created on 13.05.2019
* @author: queensgambit
*
* Definition of all constants for the game of Crazyhouse
*
* ! DO NOT CHANGE THE LABEL LIST OTHERWISE YOU WILL BREAK THE MOVE MAPPING OF THE NETWORK !
*
* This file contains the description of the policy vector which is predicted by the neural network and
* constants for designing the input planes representation.
* Each index of the array LABEL array corresponds to a unique move in uci-representation
*/
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include <string>
#include <unordered_map>
#include <iostream>
#include "state.h"
#ifndef MODE_POMMERMAN
#include "types.h"
#endif
using namespace std;
// meta data
#ifdef MODE_CRAZYHOUSE
const string engineName = "CrazyAra";
#elif defined MODE_LICHESS
const string engineName = "MultiAra";
#else // MODE_CHESS
const string engineName = "ClassicAra";
#endif
const string engineVersion = "0.9.4";
const string engineAuthors = "Johannes Czech, Moritz Willig, Alena Beyer et al.";
#define LOSS_VALUE -1
#define DRAW_VALUE 0
#define WIN_VALUE 1
#define PRESERVED_ITEMS 8
// Pre-initialized index when no forced win was found: 2^16 - 1
#define NO_CHECKMATE 65535
#define Q_VALUE_DIFF 0.1f
#define Q_INIT -1.0f
#define DEPTH_INIT 64
#define Q_TRANSPOS_DIFF 0.01
#define MAX_HASH_SIZE 100000000
#ifdef MODE_CHESS
#define VALUE_TO_CENTI_PARAM 1.4f
#else
#define VALUE_TO_CENTI_PARAM 1.2f
#endif
#define TIME_EXPECT_GAME_LENGTH 38
#define TIME_THRESH_MOVE_PROP_SYSTEM 35
#define TIME_PROP_MOVES_TO_GO 14
#define TIME_INCREMENT_FACTOR 0.7f
#define TIME_BUFFER_FACTOR 30
#ifndef MODE_POMMERMAN
#define TERMINAL_NODE_CACHE 8192
#else
#define TERMINAL_NODE_CACHE 1
#endif
const std::string result[] = {"1/2-1/2", "1-0", "0-1"};
#endif // CONSTANTS_H