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