1/*
2    Sjeng - a chess variants playing program
3    Copyright (C) 2000 Gian-Carlo Pascutto
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 2 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, write to the Free Software
17    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
19    File: extvars.h
20    Purpose: global data definitions
21
22*/
23
24#include <stdint.h>
25
26extern char divider[50];
27
28extern int board[144], moved[144], ep_square, white_to_move, wking_loc,
29  bking_loc, white_castled, black_castled, result, ply, pv_length[PV_BUFF],
30  squares[144], num_pieces, i_depth, comp_color, fifty, piece_count;
31
32extern int32_t nodes, raw_nodes, qnodes, killer_scores[PV_BUFF],
33  killer_scores2[PV_BUFF], killer_scores3[PV_BUFF], moves_to_tc, min_per_game,
34  sec_per_game, inc, time_left, opp_time, time_cushion, time_for_move, cur_score;
35
36extern uint32_t history_h[144][144];
37
38extern bool captures, searching_pv, post, time_exit, time_failure;
39extern int xb_mode, maxdepth;
40
41extern move_s pv[PV_BUFF][PV_BUFF], dummy, killer1[PV_BUFF], killer2[PV_BUFF],
42  killer3[PV_BUFF];
43
44extern  move_x path_x[PV_BUFF];
45extern  move_s path[PV_BUFF];
46
47extern rtime_t start_time;
48
49extern int holding[2][16];
50extern int num_holding[2];
51
52extern int white_hand_eval;
53extern int black_hand_eval;
54
55extern int drop_piece;
56
57extern int pieces[62];
58extern int is_promoted[62];
59
60extern int num_makemoves;
61extern int num_unmakemoves;
62extern int num_playmoves;
63extern int num_pieceups;
64extern int num_piecedowns;
65extern int max_moves;
66
67/* piece types range form 0..16 */
68extern uint32_t zobrist[17][144];
69extern uint32_t hash;
70
71extern uint32_t ECacheProbes;
72extern uint32_t ECacheHits;
73
74extern uint32_t TTProbes;
75extern uint32_t TTHits;
76extern uint32_t TTStores;
77
78extern uint32_t hold_hash;
79
80extern char book[4000][161];
81extern int num_book_lines;
82extern int book_ply;
83extern int use_book;
84extern char opening_history[STR_BUFF];
85extern uint32_t bookpos[400], booktomove[400], bookidx;
86
87extern int Material;
88extern int material[17];
89extern int zh_material[17];
90extern int std_material[17];
91extern int suicide_material[17];
92extern int losers_material[17];
93
94extern int NTries, NCuts, TExt;
95
96extern char ponder_input[STR_BUFF];
97
98extern bool is_pondering;
99
100extern uint32_t FH, FHF, PVS, FULL, PVSF;
101extern uint32_t ext_check, ext_recap, ext_onerep;
102extern uint32_t razor_drop, razor_material;
103
104extern uint32_t total_moves;
105extern uint32_t total_movegens;
106
107extern const int rank[144], file[144], diagl[144], diagr[144], sqcolor[144];
108
109extern int Variant;
110extern int Giveaway;
111extern int forcedwin;
112
113extern bool is_analyzing;
114
115extern char my_partner[STR_BUFF];
116extern bool have_partner;
117extern bool must_sit;
118extern int must_go;
119extern bool go_fast;
120extern bool piecedead;
121extern bool partnerdead;
122extern int tradefreely;
123
124extern char true_i_depth;
125
126extern int32_t fixed_time;
127
128extern int hand_value[];
129
130extern int numb_moves;
131
132extern int phase;
133
134FILE *lrn_standard;
135FILE *lrn_zh;
136FILE *lrn_suicide;
137FILE *lrn_losers;
138extern int bestmovenum;
139
140extern int ugly_ep_hack;
141
142extern int root_to_move;
143
144extern int kingcap;
145
146extern int pn_time;
147extern move_s pn_move;
148extern move_s pn_saver;
149extern bool kibitzed;
150extern int rootlosers[PV_BUFF];
151extern int alllosers;
152extern int s_threat;
153
154extern int cfg_booklearn;
155extern int cfg_devscale;
156extern int cfg_razordrop;
157extern int cfg_cutdrop;
158extern int cfg_futprune;
159extern int cfg_onerep;
160extern int cfg_recap;
161extern int cfg_smarteval;
162extern int cfg_attackeval;
163extern float cfg_scalefac;
164extern int cfg_ksafety[15][9];
165extern int cfg_tropism[5][7];
166extern int havercfile;
167extern int TTSize;
168extern int PBSize;
169extern int ECacheSize;
170
171extern int my_rating, opp_rating;
172extern int userealholdings;
173extern char realholdings[255];
174
175extern int move_number;
176extern uint32_t hash_history[600];
177
178extern int moveleft;
179extern int movetotal;
180extern char searching_move[20];
181
182extern char setcode[30];
183
184extern int EGTBProbes;
185extern int EGTBHits;
186extern int SEGTB;
187
188
189
190
191
192
193