Subversion Repositories Games.Chess Giants

Rev

Rev 33 | Rev 154 | Go to most recent revision | Details | Compare with Previous | 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 char *AK_list[128];
21
extern char *GM_list[128];
22
extern char *IM_list[128];
23
extern char *B_list[128];
24
extern char *SP_list[128];
25
extern char *SP_opening_filename[128];
26
extern char *SP_personality_filename[128];
27
extern FILE *input_stream;
28
extern FILE *book_file;
29
extern FILE *books_file;
30
extern FILE *normal_bs_file;
31
extern FILE *computer_bs_file;
32
extern FILE *history_file;
33
extern FILE *log_file;
34
extern int log_id;
35
extern int output_format;
36
#  if !defined(NOEGTB)
37
extern int EGTBlimit;
108 pmbaty 38
extern int EGTB_use;
33 pmbaty 39
extern int EGTB_draw;
108 pmbaty 40
extern int EGTB_depth;
33 pmbaty 41
extern void *EGTB_cache;
42
extern size_t EGTB_cache_size;
43
extern int EGTB_setup;
44
#  endif
45
extern int last_mate_score;
46
extern int last_opponent_move;
47
extern int check_depth;
48
extern int null_depth;
108 pmbaty 49
extern int null_divisor;
50
extern int LMR_rdepth;
51
extern int LMR_min;
52
extern int LMR_max;
53
extern double LMR_db;
54
extern double LMR_mb;
55
extern double LMR_s;
56
extern uint8_t LMR[32][64];
57
extern int rep_index;
33 pmbaty 58
extern int pgn_suggested_percent;
59
extern char pgn_event[128];
60
extern char pgn_date[128];
61
extern char pgn_round[128];
62
extern char pgn_site[128];
63
extern char pgn_white[128];
64
extern char pgn_white_elo[128];
65
extern char pgn_black[128];
66
extern char pgn_black_elo[128];
67
extern char pgn_result[128];
68
extern char log_filename[256];
69
extern char history_filename[256];
70
extern int number_of_solutions;
71
extern int solutions[10];
72
extern int solution_type;
73
extern int abs_draw_score;
74
extern int accept_draws;
75
extern int offer_draws;
108 pmbaty 76
extern int dynamic_draw_score;
33 pmbaty 77
extern int adaptive_hash;
78
extern size_t adaptive_hash_min;
79
extern size_t adaptive_hash_max;
80
extern size_t adaptive_hashp_min;
81
extern size_t adaptive_hashp_max;
82
extern int over;
83
extern int xboard;
108 pmbaty 84
extern int xboard_done;
33 pmbaty 85
extern int pong;
86
extern char book_path[128];
87
extern char log_path[128];
88
extern char tb_path[128];
89
extern char rc_path[128];
90
extern char cmd_buffer[4096];
91
extern char *args[512];
92
extern char buffer[4096];
93
extern int line_length;
94
extern unsigned char convert_buff[8];
95
extern int nargs;
96
extern int kibitz;
97
extern int game_wtm;
98
extern int last_search_value;
99
extern int pruning_margin[10];
100
extern int pruning_depth;
108 pmbaty 101
extern int movecnt_pruning[4];
102
extern int movecnt_depth;
33 pmbaty 103
extern int failhi_delta, faillo_delta;
104
extern int ponder_value;
105
extern int move_actually_played;
106
extern int analyze_mode;
107
extern int annotate_mode;
108
extern int input_status;        /* 0=no input;
109
                                   1=predicted move read;
110
                                   2=unpredicted move read;
111
                                   3=something read, not executed. */
112
extern int resign;
113
extern int resign_counter;
114
extern int resign_count;
115
extern int draw_counter;
116
extern int draw_count;
117
extern int draw_offer_pending;
118
extern int draw_offered;
119
extern char audible_alarm;
120
extern char speech;
108 pmbaty 121
extern char ponder_text[512];
33 pmbaty 122
extern char book_hint[512];
123
extern int post;
124
extern int search_depth;
108 pmbaty 125
extern uint64_t search_nodes;
126
extern uint64_t temp_search_nodes;
33 pmbaty 127
extern int search_move;
128
extern int ponder;
129
extern int ponder_move;
130
extern int force;
108 pmbaty 131
extern unsigned ponder_moves[256];
33 pmbaty 132
extern int num_ponder_moves;
133
extern char initial_position[80];
134
extern int predicted;
135
extern int trace_level;
136
extern int book_move;
137
extern int book_accept_mask;
138
extern int book_reject_mask;
139
extern int book_random;
140
extern float book_weight_freq;
141
extern float book_weight_eval;
142
extern float book_weight_learn;
143
extern int book_search_trigger;
144
extern int book_selection_width;
145
extern int show_book;
146
extern int learn;
147
extern int learning;
148
extern int learn_value;
149
extern int abort_search;
108 pmbaty 150
extern int iteration;
33 pmbaty 151
extern int root_wtm;
152
extern int last_root_value;
153
extern ROOT_MOVE root_moves[256];
154
extern int n_root_moves;
155
extern int difficulty;
156
extern int time_limit;
157
extern int absolute_time_limit;
158
extern int search_time_limit;
159
extern int burp;
160
extern int quit;
108 pmbaty 161
extern unsigned opponent_start_time, opponent_end_time;
162
extern unsigned program_start_time, program_end_time;
163
extern unsigned start_time, end_time;
33 pmbaty 164
extern TREE *block[MAX_BLOCKS + 1];
165
extern THREAD thread[CPUS];
166
#  if (CPUS > 1)
108 pmbaty 167
extern lock_t lock_smp, lock_io;
33 pmbaty 168
#    if defined(UNIX)
169
extern pthread_attr_t attributes;
170
#    endif
171
#  endif
108 pmbaty 172
extern unsigned int smp_max_threads;
173
extern unsigned int smp_split_group;
174
extern unsigned int smp_split_at_root;
175
extern unsigned int smp_min_split_depth;
176
extern unsigned int smp_gratuitous_depth;
177
extern unsigned int smp_gratuitous_limit;
178
extern int smp_affinity;
179
extern int smp_numa;
180
extern int autotune_params;
181
extern struct autotune tune[16];
182
extern unsigned smp_split_nodes;
183
extern unsigned parallel_splits;
184
extern unsigned parallel_splits_wasted;
185
extern unsigned parallel_aborts;
186
extern unsigned parallel_joins;
187
extern unsigned busy_percent;
188
extern uint64_t game_max_blocks;
33 pmbaty 189
extern volatile int smp_split;
190
extern volatile int smp_threads;
191
extern volatile int initialized_threads;
192
extern int crafty_is_white;
108 pmbaty 193
extern unsigned nodes_between_time_checks;
194
extern unsigned nodes_per_second;
33 pmbaty 195
extern int next_time_check;
196
extern int transposition_age;
197
extern int thinking;
198
extern int pondering;
199
extern int puzzling;
200
extern int booking;
201
extern int display_options;
108 pmbaty 202
extern unsigned noise_level;
33 pmbaty 203
extern int noise_block;
204
extern int tc_moves;
205
extern int tc_time;
206
extern int tc_time_remaining[2];
207
extern int tc_moves_remaining[2];
208
extern int tc_secondary_moves;
209
extern int tc_secondary_time;
210
extern int tc_increment;
211
extern int tc_sudden_death;
212
extern int tc_safety_margin;
213
extern int draw_score[2];
214
extern char kibitz_text[4096];
215
extern int kibitz_depth;
216
extern int move_number;
217
extern int moves_out_of_book;
218
extern int first_nonbook_factor;
219
extern int first_nonbook_span;
220
extern int smp_nice;
221
#  if defined(SKILL)
222
extern int skill;
223
#  endif
224
extern int book_learn_eval[LEARN_INTERVAL];
225
extern int book_learn_depth[LEARN_INTERVAL];
226
extern int learn_seekto[64];
227
extern uint64_t learn_key[64];
228
extern int learn_nmoves[64];
229
extern uint64_t book_learn_key;
230
extern int learn_positions_count;
231
extern int book_learn_nmoves;
232
extern int book_learn_seekto;
233
extern int usage_level;
234
extern size_t hash_table_size;
235
extern size_t hash_path_size;
108 pmbaty 236
extern uint64_t hash_mask;
237
extern uint64_t mask_clear_entry;
33 pmbaty 238
extern uint64_t hash_path_mask;
239
extern size_t pawn_hash_table_size;
240
extern uint64_t pawn_hash_mask;
108 pmbaty 241
extern size_t eval_hash_table_size;
242
extern uint64_t eval_hash_mask;
243
extern HASH_ENTRY *hash_table;
33 pmbaty 244
extern HPATH_ENTRY *hash_path;
245
extern PAWN_HASH_ENTRY *pawn_hash_table;
108 pmbaty 246
extern uint64_t *eval_hash_table;
33 pmbaty 247
extern void *segments[MAX_BLOCKS + 32][2];
248
extern int nsegments;
249
extern const int pcval[7];
250
extern const int p_vals[7];
108 pmbaty 251
extern const int MVV_LVA[7][7];
33 pmbaty 252
extern const int pieces[2][7];
108 pmbaty 253
extern const int lower_n;
254
extern const int lower_b;
255
extern const int mobility_score_n[4];
256
extern const int mobility_score_b[4];
257
extern const int mobility_score_r[4];
258
extern const int mob_curve_r[48];
33 pmbaty 259
extern PATH last_pv;
260
extern int last_value;
261
extern const char translate[13];
262
extern const char empty_sqs[9];
263
extern const int mate[64];
108 pmbaty 264
extern const uint64_t magic_rook[64];
265
extern const uint64_t magic_rook_mask[64];
266
extern const unsigned magic_rook_shift[64];
267
extern const uint64_t mobility_mask_b[4];
268
extern const uint64_t mobility_mask_r[4];
269
extern int16_t *magic_bishop_mobility_indices[64];
270
extern int16_t magic_bishop_mobility_table[5248];
33 pmbaty 271
extern uint64_t *magic_rook_indices[64];
272
extern uint64_t magic_rook_table[102400];
273
extern int16_t *magic_rook_mobility_indices[64];
274
extern int16_t magic_rook_mobility_table[102400];
108 pmbaty 275
extern const uint64_t magic_bishop[64];
276
extern const uint64_t magic_bishop_mask[64];
277
extern const unsigned magic_bishop_shift[64];
33 pmbaty 278
extern uint64_t *magic_bishop_indices[64];
279
extern uint64_t magic_bishop_table[5248];
280
extern int16_t *magic_bishop_mobility_indices[64];
281
extern int16_t magic_bishop_mobility_table[5248];
282
extern int8_t directions[64][64];
283
extern uint64_t pawn_attacks[2][64];
284
extern uint64_t knight_attacks[64];
285
extern uint64_t rook_attacks[64];
286
extern uint64_t bishop_attacks[64];
287
extern POSITION display;
288
extern uint64_t king_attacks[64];
289
extern uint64_t intervening[64][64];
108 pmbaty 290
extern int history[1024];
291
extern KILLER counter_move[4096];
292
extern KILLER move_pair[4096];
293
extern const uint64_t randoms[2][7][64];
294
extern const uint64_t castle_random[2][2];
295
extern const uint64_t enpassant_random[65];
33 pmbaty 296
extern uint64_t clear_mask[65];
297
extern uint64_t set_mask[65];
298
extern uint64_t file_mask[8];
299
extern uint64_t rank_mask[8];
108 pmbaty 300
extern const uint64_t OO[2];
301
extern const uint64_t OOO[2];
302
extern const uint64_t mask_efgh, mask_fgh, mask_abc, mask_abcd;
303
extern const uint64_t mask_advance_2_w;
304
extern const uint64_t mask_advance_2_b;
305
extern const uint64_t mask_left_edge;
306
extern const uint64_t mask_right_edge;
307
extern const uint64_t mask_not_edge;
308
extern const uint64_t mask_rook_files;
309
extern const uint64_t dark_squares;
310
extern const uint64_t not_rook_pawns;
311
extern const uint64_t not_rook_files;
33 pmbaty 312
extern uint64_t plus1dir[65];
313
extern uint64_t plus7dir[65];
314
extern uint64_t plus8dir[65];
315
extern uint64_t plus9dir[65];
316
extern uint64_t minus1dir[65];
317
extern uint64_t minus7dir[65];
318
extern uint64_t minus8dir[65];
319
extern uint64_t minus9dir[65];
320
extern uint64_t mask_eptest[64];
321
#  if !defined(INLINEASM)
322
extern unsigned char msb[65536];
323
extern unsigned char lsb[65536];
324
#  endif
325
extern unsigned char msb_8bit[256];
326
extern unsigned char lsb_8bit[256];
327
extern unsigned char pop_cnt_8bit[256];
108 pmbaty 328
extern uint64_t mask_pawn_connected[2][64];
33 pmbaty 329
extern uint64_t mask_pawn_isolated[64];
330
extern uint64_t mask_passed[2][64];
108 pmbaty 331
extern uint64_t mask_pattacks[2][64];
33 pmbaty 332
extern uint64_t pawn_race[2][2][64];
333
extern BOOK_POSITION book_buffer[BOOK_CLUSTER_SIZE];
334
extern BOOK_POSITION book_buffer_char[BOOK_CLUSTER_SIZE];
335
extern const int rankflip[2][8];
336
extern const int sqflip[2][64];
108 pmbaty 337
extern const int rank1[2];
338
extern const int rank2[2];
339
extern const int rank3[2];
340
extern const int rank4[2];
341
extern const int rank5[2];
342
extern const int rank6[2];
343
extern const int rank7[2];
344
extern const int rank8[2];
345
extern const int epdir[2];
346
extern const int csq[2];
347
extern const int dsq[2];
348
extern const int esq[2];
349
extern const int fsq[2];
350
extern const int gsq[2];
33 pmbaty 351
extern const int sign[2];
108 pmbaty 352
extern const char square_color[64];
353
extern uint64_t distance_ring[64][8];
354
extern const int OOsqs[2][3];
355
extern const int OOOsqs[2][3];
356
extern const int OOfrom[2];
357
extern const int OOto[2];
358
extern const int OOOto[2];
359
extern const int epsq[2];
360
extern const int rook_A[2];
361
extern const int rook_D[2];
362
extern const int rook_F[2];
363
extern const int rook_G[2];
364
extern const int rook_H[2];
365
extern const int capleft[2];
366
extern const int capright[2];
367
extern const int pawnadv1[2];
368
extern const int pawnadv2[2];
33 pmbaty 369
#  if !defined(NOEGTB)
370
extern int cbEGTBCompBytes;
371
#  endif
108 pmbaty 372
extern int piece_values[2][7];
33 pmbaty 373
extern struct personality_term personality_packet[256];
374
#endif