Subversion Repositories Games.Chess Giants

Rev

Rev 108 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 pmbaty 1
#if !defined(DATA_INCLUDED)
2
#  define DATA_INCLUDED
3
extern int scale;
4
extern char version[8];
5
extern int presult;
6
extern PLAYING_MODE mode;
7
extern int batch_mode;
8
extern int swindle_mode;
9
extern int call_flag;
10
extern int crafty_rating;
11
extern int opponent_rating;
12
extern int time_used;
13
extern int time_used_opponent;
14
extern uint64_t total_moves;
15
extern int allow_cores;
16
extern int allow_memory;
17
extern int initialized;
18
extern int early_exit;
19
extern int new_game;
20
extern uint64_t burner[10];
21
extern int burnc[10];
22
extern char *AK_list[128];
23
extern char *GM_list[128];
24
extern char *IM_list[128];
25
extern char *B_list[128];
26
extern char *SP_list[128];
27
extern char *SP_opening_filename[128];
28
extern char *SP_personality_filename[128];
29
extern FILE *input_stream;
30
extern FILE *book_file;
31
extern FILE *books_file;
32
extern FILE *normal_bs_file;
33
extern FILE *computer_bs_file;
34
extern FILE *history_file;
35
extern FILE *log_file;
36
extern int log_id;
37
extern int output_format;
38
 
39
#  if !defined(NOEGTB)
40
extern int EGTBlimit;
41
extern int EGTB_draw;
42
extern int EGTB_search;
43
extern int EGTB_use;
44
extern void *EGTB_cache;
45
extern size_t EGTB_cache_size;
46
extern int EGTB_setup;
47
#  endif
48
extern int done;
49
extern int last_mate_score;
50
extern int last_opponent_move;
51
extern int check_depth;
52
extern int null_depth;
53
extern int LMR_remaining_depth;
54
extern int LMR_min_reduction;
55
extern int LMR_max_reduction;
56
extern int pgn_suggested_percent;
57
extern char pgn_event[128];
58
extern char pgn_date[128];
59
extern char pgn_round[128];
60
extern char pgn_site[128];
61
extern char pgn_white[128];
62
extern char pgn_white_elo[128];
63
extern char pgn_black[128];
64
extern char pgn_black_elo[128];
65
extern char pgn_result[128];
66
extern char log_filename[256];
67
extern char history_filename[256];
68
extern int number_of_solutions;
69
extern int solutions[10];
70
extern int solution_type;
71
extern int abs_draw_score;
72
extern int accept_draws;
73
extern int offer_draws;
74
extern int adaptive_hash;
75
extern size_t adaptive_hash_min;
76
extern size_t adaptive_hash_max;
77
extern size_t adaptive_hashp_min;
78
extern size_t adaptive_hashp_max;
79
extern int over;
80
extern int xboard;
81
extern int pong;
82
extern char book_path[128];
83
extern char log_path[128];
84
extern char tb_path[128];
85
extern char rc_path[128];
86
extern char cmd_buffer[4096];
87
extern char *args[512];
88
extern char buffer[4096];
89
extern int line_length;
90
extern unsigned char convert_buff[8];
91
extern int nargs;
92
extern int kibitz;
93
extern int game_wtm;
94
extern int last_search_value;
95
extern int pruning_margin[10];
96
extern int pruning_depth;
97
extern int failhi_delta, faillo_delta;
98
extern int ponder_value;
99
extern int move_actually_played;
100
extern int analyze_mode;
101
extern int annotate_mode;
102
extern int input_status;        /* 0=no input;
103
                                   1=predicted move read;
104
                                   2=unpredicted move read;
105
                                   3=something read, not executed. */
106
extern int resign;
107
extern int resign_counter;
108
extern int resign_count;
109
extern int draw_counter;
110
extern int draw_count;
111
extern int draw_offer_pending;
112
extern int draw_offered;
113
extern char audible_alarm;
114
extern char speech;
115
extern char hint[512];
116
extern char book_hint[512];
117
extern int post;
118
extern int search_depth;
119
extern /*uint64_t*/ unsigned int search_nodes; // Pierre-Marie Baty -- fixed type
120
extern /*uint64_t*/ unsigned int temp_search_nodes; // Pierre-Marie Baty -- fixed type
121
extern int search_move;
122
extern int ponder;
123
extern int ponder_move;
124
extern int force;
125
extern int ponder_moves[220];
126
extern int num_ponder_moves;
127
extern char initial_position[80];
128
extern int predicted;
129
extern int trace_level;
130
extern int book_move;
131
extern int book_accept_mask;
132
extern int book_reject_mask;
133
extern int book_random;
134
extern float book_weight_freq;
135
extern float book_weight_eval;
136
extern float book_weight_learn;
137
extern int book_search_trigger;
138
extern int book_selection_width;
139
extern int show_book;
140
extern int learn;
141
extern int learning;
142
extern int learn_value;
143
extern int abort_search;
144
extern int iteration_depth;
145
extern int root_wtm;
146
extern int root_beta;
147
extern int last_root_value;
148
extern ROOT_MOVE root_moves[256];
149
extern int n_root_moves;
150
extern int difficulty;
151
extern int time_limit;
152
extern int absolute_time_limit;
153
extern int search_time_limit;
154
extern int burp;
155
extern int quit;
156
extern unsigned int opponent_start_time, opponent_end_time;
157
extern unsigned int program_start_time, program_end_time;
158
extern unsigned int start_time, end_time;
159
extern TREE *block[MAX_BLOCKS + 1];
160
extern THREAD thread[CPUS];
161
#  if (CPUS > 1)
162
extern lock_t lock_split, lock_smp, lock_io, lock_root;
163
 
164
#    if defined(UNIX)
165
extern pthread_attr_t attributes;
166
#    endif
167
#  endif
168
extern int smp_max_threads;
169
extern int smp_split_group;
170
extern int smp_split_at_root;
171
extern int smp_min_split_depth;
172
extern unsigned int smp_split_nodes;
173
extern unsigned int parallel_splits;
174
extern unsigned int parallel_aborts;
175
extern unsigned int idle_time;
176
extern unsigned int max_split_blocks;
177
extern unsigned int idle_percent;
178
extern volatile int smp_idle;
179
extern volatile int smp_split;
180
extern volatile int smp_threads;
181
extern volatile int initialized_threads;
182
extern int crafty_is_white;
183
extern unsigned int nodes_between_time_checks;
184
extern unsigned int nodes_per_second;
185
extern int next_time_check;
186
extern int transposition_age;
187
extern int thinking;
188
extern int pondering;
189
extern int puzzling;
190
extern int booking;
191
extern int display_options;
192
extern unsigned int noise_level;
193
extern int noise_block;
194
extern int tc_moves;
195
extern int tc_time;
196
extern int tc_time_remaining[2];
197
extern int tc_moves_remaining[2];
198
extern int tc_secondary_moves;
199
extern int tc_secondary_time;
200
extern int tc_increment;
201
extern int tc_sudden_death;
202
extern int tc_operator_time;
203
extern int tc_safety_margin;
204
extern int draw_score[2];
205
extern char kibitz_text[4096];
206
extern int kibitz_depth;
207
extern int move_number;
208
extern int moves_out_of_book;
209
extern int first_nonbook_factor;
210
extern int first_nonbook_span;
211
extern int smp_nice;
212
 
213
#  if defined(SKILL)
214
extern int skill;
215
#  endif
216
extern int book_learn_eval[LEARN_INTERVAL];
217
extern int book_learn_depth[LEARN_INTERVAL];
218
extern int learn_seekto[64];
219
extern uint64_t learn_key[64];
220
extern int learn_nmoves[64];
221
extern uint64_t book_learn_key;
222
extern int learn_positions_count;
223
extern int book_learn_nmoves;
224
extern int book_learn_seekto;
225
extern int usage_level;
226
extern size_t hash_table_size;
227
extern size_t hash_path_size;
228
extern uint64_t hash_path_mask;
229
extern size_t pawn_hash_table_size;
230
extern uint64_t hash_mask;
231
extern uint64_t pawn_hash_mask;
232
extern HASH_ENTRY *trans_ref;
233
extern HPATH_ENTRY *hash_path;
234
extern PAWN_HASH_ENTRY *pawn_hash_table;
235
extern void *segments[MAX_BLOCKS + 32][2];
236
extern int nsegments;
237
extern const int p_values[13];
238
extern const int pcval[7];
239
extern const int p_vals[7];
240
extern const int pieces[2][7];
241
extern PATH last_pv;
242
extern int last_value;
243
extern const char translate[13];
244
extern const char empty_sqs[9];
245
extern const char square_color[64];
246
extern int knight_outpost[2][64];
247
extern int bishop_outpost[2][64];
248
extern int passed_pawn_hidden[2];
249
extern int doubled_pawn_value[2];
250
extern int outside_passed[2];
251
extern int pawn_defects[2][8];
252
extern int open_file[8];
253
extern int half_open_file[8];
254
extern int imbalance[9][9];
255
extern int pp_dist_bonus[8];
256
extern int king_tropism_n[8];
257
extern int king_tropism_b[8];
258
extern int king_tropism_r[8];
259
extern int king_tropism_q[8];
260
extern int pval[2][2][64];
261
extern int nval[2][2][64];
262
extern int bval[2][2][64];
263
extern int qval[2][2][64];
264
extern int kval_n[2][64];
265
extern int kval_k[2][64];
266
extern int kval_q[2][64];
267
extern int king_safety[16][16];
268
extern int mob_curve_r[48];
269
extern int safety_vector[16];
270
extern int tropism_vector[16];
271
extern const char b_n_mate_dark_squares[64];
272
extern const char b_n_mate_light_squares[64];
273
extern const int mate[64];
274
extern int16_t knight_mobility_table[64];
275
extern uint64_t magic_rook[64];
276
extern uint64_t magic_rook_mask[64];
277
extern unsigned int magic_rook_shift[64];
278
extern uint64_t mobility_mask_n[4];
279
extern uint64_t mobility_mask_b[4];
280
extern uint64_t mobility_mask_r[4];
281
extern uint64_t *magic_rook_indices[64];
282
extern uint64_t magic_rook_table[102400];
283
extern int16_t *magic_rook_mobility_indices[64];
284
extern int16_t magic_rook_mobility_table[102400];
285
extern uint64_t magic_bishop[64];
286
extern uint64_t magic_bishop_mask[64];
287
extern unsigned int magic_bishop_shift[64];
288
extern uint64_t *magic_bishop_indices[64];
289
extern uint64_t magic_bishop_table[5248];
290
extern int16_t *magic_bishop_mobility_indices[64];
291
extern int16_t magic_bishop_mobility_table[5248];
292
extern int8_t directions[64][64];
293
extern uint64_t pawn_attacks[2][64];
294
extern uint64_t knight_attacks[64];
295
extern uint64_t rook_attacks[64];
296
extern uint64_t bishop_attacks[64];
297
extern POSITION display;
298
extern uint64_t king_attacks[64];
299
extern uint64_t intervening[64][64];
300
extern uint64_t randoms[2][7][64];
301
extern uint64_t castle_random[2][2];
302
extern uint64_t enpassant_random[65];
303
extern uint64_t clear_mask[65];
304
extern uint64_t set_mask[65];
305
extern uint64_t file_mask[8];
306
extern uint64_t rank_mask[8];
307
extern uint64_t OO[2];
308
extern uint64_t OOO[2];
309
extern uint64_t mask_efgh, mask_fgh, mask_abc, mask_abcd;
310
extern uint64_t mask_advance_2_w;
311
extern uint64_t mask_advance_2_b;
312
extern uint64_t mask_left_edge;
313
extern uint64_t mask_right_edge;
314
extern uint64_t mask_not_edge;
315
extern uint64_t dark_squares;
316
extern uint64_t not_rook_pawns;
317
extern uint64_t plus1dir[65];
318
extern uint64_t plus7dir[65];
319
extern uint64_t plus8dir[65];
320
extern uint64_t plus9dir[65];
321
extern uint64_t minus1dir[65];
322
extern uint64_t minus7dir[65];
323
extern uint64_t minus8dir[65];
324
extern uint64_t minus9dir[65];
325
extern uint64_t mask_eptest[64];
326
extern uint64_t mask_clear_entry;
327
 
328
#  if !defined(INLINEASM)
329
extern unsigned char msb[65536];
330
extern unsigned char lsb[65536];
331
#  endif
332
extern unsigned char msb_8bit[256];
333
extern unsigned char lsb_8bit[256];
334
extern unsigned char pop_cnt_8bit[256];
335
extern unsigned char is_outside[256][256];
336
extern uint64_t mask_pawn_connected[64];
337
extern uint64_t mask_pawn_isolated[64];
338
extern uint64_t mask_passed[2][64];
339
extern uint64_t mask_no_pattacks[2][64];
340
extern uint64_t mask_hidden_left[2][8];
341
extern uint64_t mask_hidden_right[2][8];
342
extern uint64_t pawn_race[2][2][64];
343
extern BOOK_POSITION book_buffer[BOOK_CLUSTER_SIZE];
344
extern BOOK_POSITION book_buffer_char[BOOK_CLUSTER_SIZE];
345
extern const int rankflip[2][8];
346
extern const int sqflip[2][64];
347
extern const int sign[2];
348
extern int direction[2];
349
extern int dark_corner[2];
350
extern int light_corner[2];
351
extern int OOsqs[2][3];
352
extern int OOOsqs[2][3];
353
extern int OOfrom[2];
354
extern int OOto[2];
355
extern int OOOto[2];
356
extern int epsq[2];
357
extern int rook_A[2];
358
extern int rook_D[2];
359
extern int rook_F[2];
360
extern int rook_G[2];
361
extern int rook_H[2];
362
extern int capleft[2];
363
extern int capright[2];
364
extern int pawnadv1[2];
365
extern int pawnadv2[2];
366
 
367
#  if !defined(NOEGTB)
368
extern int cbEGTBCompBytes;
369
#  endif
370
extern int piece_values[7][2];
371
extern int pawn_can_promote;
372
extern int wtm_bonus[2];
373
extern int undeveloped_piece;
374
extern int pawn_connected[2];
375
extern int pawn_isolated[2];
376
extern int pawn_weak[2];
377
extern int lower_n;
378
extern int mobility_score_n[4];
379
extern int lower_b;
380
extern int bishop_trapped;
381
extern int bishop_with_wing_pawns[2];
382
extern int bishop_pair[2];
383
extern int mobility_score_b[4];
384
extern int mobility_score_r[4];
385
extern int rook_on_7th[2];
386
extern int rook_open_file[2];
387
extern int rook_half_open_file[2];
388
extern int rook_behind_passed_pawn[2][8];
389
extern int passed_pawn_value[2][8];
390
extern int passed_pawn_blockaded_by_enemy[2][8];
391
extern int passed_pawn_blockaded_by_friendly[2][8];
392
extern int passed_pawn_connected[2][8];
393
extern int passed_pawn_candidate[2][8];
394
extern int passed_pawn_obstructed[8];
395
extern int passed_pawn_far_away[8];
396
extern int passed_pawn_not_far_away[8];
397
extern int rook_trapped;
398
extern int king_king_tropism;
399
extern int king_safety_mate_threat;
400
extern int development_thematic;
401
extern int development_losing_castle;
402
extern int development_not_castled;
403
extern struct personality_term personality_packet[256];
404
#endif