Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
99 | pmbaty | 1 | /* |
2 | Texel - A UCI chess engine. |
||
3 | Copyright (C) 2012-2014 Peter Ă–sterlund, peterosterlund2@gmail.com |
||
4 | |||
5 | This program is free software: you can redistribute it and/or modify |
||
6 | it under the terms of the GNU General Public License as published by |
||
7 | the Free Software Foundation, either version 3 of the License, or |
||
8 | (at your option) any later version. |
||
9 | |||
10 | This program is distributed in the hope that it will be useful, |
||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
13 | GNU General Public License for more details. |
||
14 | |||
15 | You should have received a copy of the GNU General Public License |
||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
17 | */ |
||
18 | |||
19 | /* |
||
20 | * constants.hpp |
||
21 | * |
||
22 | * Created on: Mar 2, 2012 |
||
23 | * Author: petero |
||
24 | */ |
||
25 | |||
26 | #ifndef CONSTANTS_HPP_ |
||
27 | #define CONSTANTS_HPP_ |
||
28 | |||
29 | namespace SearchConst { |
||
30 | const int MATE0 = 32000; |
||
31 | const int UNKNOWN_SCORE = -32767; // Represents unknown static eval score |
||
32 | const int plyScale = 8; // Fractional ply resolution |
||
33 | const int MIN_SMP_DEPTH = 10; // Minimum depth for SMP work sharing |
||
34 | const int MAX_SP_PER_THREAD = 32; // Maximum number of SplitPoints per thread |
||
35 | |||
36 | inline bool isWinScore(int score) { return score > MATE0 / 2; } |
||
37 | inline bool isLoseScore(int score) { return score < -(MATE0 / 2); } |
||
38 | } |
||
39 | |||
40 | namespace TType { |
||
41 | const int T_EMPTY = 0; // Empty hash slot |
||
42 | const int T_EXACT = 1; // Exact score |
||
43 | const int T_GE = 2; // True score >= this score |
||
44 | const int T_LE = 3; // True score <= this score |
||
45 | } |
||
46 | |||
47 | #endif /* CONSTANTS_HPP_ */ |