Ticket #198: gunnar_7_12.6.diff
| File gunnar_7_12.6.diff, 25.5 KB (added by gunnar, 4 years ago) |
|---|
-
patterns/eyes.h
34 34 */ 35 35 36 36 struct eye_vertex { 37 char marginal; /* 1 if marginal vertex, 0 otherwise*/38 char edge;/* 0 = center, 1 = edge, 2 = corner */37 signed char marginal; /* 1 if marginal vertex, 0 otherwise */ 38 signed char edge; /* 0 = center, 1 = edge, 2 = corner */ 39 39 /* A corner vertex may only be matched at the corner. 40 40 * An edge vertex may be matched at the corner or on the edge. 41 41 * A center vertex may be matched anywhere. 42 42 */ 43 char flags;/* see the #defines above */43 signed char flags; /* see the #defines above */ 44 44 45 char neighbors;/* number of neighbors */46 int n[4]; /* position in array of vertex neighors */45 signed char neighbors; /* number of neighbors */ 46 signed char n[4]; /* position in array of vertex neighbors */ 47 47 }; 48 48 49 49 … … 54 54 55 55 struct eye_graph { 56 56 struct eye_vertex *vertex; 57 int patnum; /* Number of pattern*/57 int patnum; /* number of pattern */ 58 58 int esize; /* number of vertices */ 59 59 int msize; /* number of marginal vertices */ 60 60 int ends; /* number of vertices with one neighbor */ -
patterns/patterns.db
7349 7349 7350 7350 :8,OE 7351 7351 7352 ?O...? 7353 ?..*.? 7352 7354 ?a...? 7353 ?..*.?7354 ?b...?7355 7355 ?????? 7356 7356 7357 ;xarea(*) && oarea( b)7357 ;xarea(*) && oarea(a) 7358 7358 7359 7359 7360 7360 Pattern CB106 -
patterns/uncompress_fuseki.c
101 101 #define C_HEADER "struct fullboard_pattern fuseki%d[] = {\n" 102 102 #define C_FOOTER "};\n" 103 103 104 const char *const db_output_strings[3] =104 static const char *const db_output_strings[3] = 105 105 {DB_PREAMBLE, DB_HEADER, DB_FOOTER}; 106 const char *const c_output_strings[3] =106 static const char *const c_output_strings[3] = 107 107 {C_PREAMBLE, C_HEADER, C_FOOTER}; 108 108 109 109 #define PREAMBLE 0 -
patterns/mkeyes.c
26 26 /* see also eyes.db, eyes.h and engine/optics.c */ 27 27 28 28 29 #define MAX_BOARD 1930 29 #define MAXLINE 80 31 30 #define MAXDIMEN 20 32 31 #define MAXSIZE 20 -
doc/using.texi
541 541 @option{-l} and @option{-L} to create a diagram of the board from 542 542 another sgf file. Illegal moves are indicated with the private 543 543 @code{IL} property. This property is not used in the FF4 SGF 544 specification, so we are free to preempt it. This feature is used 545 in the CGI interface in @file{interface/html/gg.cgi}. 544 specification, so we are free to preempt it. 546 545 @end quotation 547 546 @item @option{--options} 548 547 @quotation … … 621 620 depth (default 13), GNU Go still tries to attack strings with only 622 621 3 liberties, but only tries one move at each node. 623 622 @end quotation 624 @item @option{--break _chain-cutoff@var{depth}}623 @item @option{--break-chain-depth @var{depth}} 625 624 @quotation 626 625 Set the @code{break_chain_depth}. Beyond this depth, GNU Go abandons 627 626 some attempts to defend groups by trying to capture part of the surrounding -
doc/introduction.texi
57 57 by the Free Software Foundation except as noted below. 58 58 59 59 All files are under the GNU General Public License (@pxref{GPL}), 60 except @file{gmp.c}, @file{gmp.h}, @file{gtp.c}, @file{gtp.h}, the files 61 @file{interface/html/*} and @file{win/makefile.win}. 60 except @file{gmp.c}, @file{gmp.h}, @file{gtp.c}, and @file{gtp.h}. 62 61 63 62 The files @file{gtp.c} and @file{gtp.h} are copyright the Free Software 64 63 Foundation. In the interests of promoting the Go Text Protocol these … … 68 67 The two files @file{gmp.c} and @file{gmp.h} were placed in the public domain 69 68 by William Shubert, their author, and are free for unrestricted use. 70 69 71 The files @file{interface/html/*} are not part of GNU Go but are a separate72 program and are included in the distribution for the convenience of anyone73 looking for a CGI interface to GNU Go. They were placed in the public domain74 by their author, Douglas Ridgway, and are free for unrestricted use.75 76 70 The files @file{regression/games/golois/*sgf} are copyright Tristan 77 71 Cazenave and are included with his permission. 78 72 -
configure.in
49 49 dnl and look to see if they want to disable the grid optimisation 50 50 51 51 AC_ARG_ENABLE(grid-opt, 52 [ --enable-grid-opt enable the grid optim sation within the pattern52 [ --enable-grid-opt enable the grid optimisation within the pattern 53 53 matcher (default) 54 --enable-grid-opt=distrust enable the grid optim sation in non-trusting mode54 --enable-grid-opt=distrust enable the grid optimisation in non-trusting mode 55 55 --disable-grid-opt disable the grid optimisation]) 56 56 57 57 default_cache_size=-1 -
README
231 231 * The files gmp.c and gmp.h are copyright Bill Shubert. These 232 232 are free for unrestricted use. 233 233 234 * The files interface/html/* are not part of GNU Go but are a separate235 probram and are included in the distribution for the convenience of anyone236 looking for a CGI interface to GNU Go. They were placed in the public domain237 by their author, Douglas Ridgway, and are free for unrestricted use.238 239 234 * The files regression/golois/* and the tests vie.tst, connect.tst, 240 235 capture.tst and global.tst are copyright Tristan Cazenave and are 241 236 used with his permission -
interface/gtp_examples/twogtp.pike
758 758 759 759 if (move_lower_case == "pass") { 760 760 if (verbose) 761 werror( player->capitalized_color + " passes\n");761 werror("play " + player->capitalized_color + " pass\n"); 762 762 763 763 if (++passes == 2) 764 764 break; … … 769 769 if (time_left == " ()") 770 770 time_left = ""; 771 771 772 werror(" %s plays %s%s\n", player->capitalized_color,772 werror("play %s %s%s\n", player->capitalized_color, 773 773 move, time_left); 774 774 } 775 775 -
interface/play_ascii.c
951 951 tmpstring = strtok(NULL, " "); 952 952 if (tmpstring) { 953 953 /* discard newline */ 954 tmpstring[strlen(tmpstring) -1] = 0;954 tmpstring[strlen(tmpstring) - 1] = 0; 955 955 /* make sure we are saving proper handicap */ 956 956 init_sgf(gameinfo); 957 957 writesgf(sgftree.root, tmpstring); … … 968 968 tmpstring = strtok(NULL, " "); 969 969 if (tmpstring) { 970 970 /* discard newline */ 971 tmpstring[strlen(tmpstring) -1] = 0;971 tmpstring[strlen(tmpstring) - 1] = 0; 972 972 if (!sgftree_readfile(&sgftree, tmpstring)) { 973 973 fprintf(stderr, "Cannot open or parse '%s'\n", tmpstring); 974 974 break; … … 1070 1070 tmpstring = strtok(NULL, " "); 1071 1071 if (tmpstring) { 1072 1072 /* discard newline */ 1073 tmpstring[strlen(tmpstring) -1] = 0;1073 tmpstring[strlen(tmpstring) - 1] = 0; 1074 1074 init_sgf(gameinfo); 1075 1075 writesgf(sgftree.root, tmpstring); 1076 1076 } … … 1160 1160 if (pos == NO_MOVE || board[pos] == EMPTY) 1161 1161 printf("\ninvalid!\n"); 1162 1162 else { 1163 intstatus = dragon_status(pos);1163 enum dragon_status status = dragon_status(pos); 1164 1164 status = (status == DEAD) ? ALIVE : DEAD; 1165 1165 change_dragon_status(pos, status); 1166 1166 ascii_showboard(); -
interface/play_gtp.c
2002 2002 owl_analyze_semeai(dragona, dragonb, &resulta, &resultb, &move, 0, 2003 2003 &result_certain); 2004 2004 gtp_start_response(GTP_SUCCESS); 2005 gtp_ mprintf("%s %s %m",2006 status_to_string(resulta), 2007 status_to_string(resultb), 2008 I(move), J(move));2005 gtp_print_code(resulta); 2006 gtp_printf(" "); 2007 gtp_print_code(resultb); 2008 gtp_mprintf(" %m", I(move), J(move)); 2009 2009 if (!result_certain && report_uncertainty) 2010 2010 gtp_printf(" uncertain"); 2011 2011 -
interface/main.c
231 231 {"backfill-depth", required_argument, 0, 'B'}, 232 232 {"branch-depth", required_argument, 0, OPT_BRANCH_DEPTH}, 233 233 {"backfill2-depth", required_argument, 0, OPT_BACKFILL2_DEPTH}, 234 {"break _chain-depth", required_argument, 0, OPT_BREAK_CHAIN_DEPTH},234 {"break-chain-depth", required_argument, 0, OPT_BREAK_CHAIN_DEPTH}, 235 235 {"superstring-depth", required_argument, 0, OPT_SUPERSTRING_DEPTH}, 236 236 {"fourlib-depth", required_argument, 0, 'F'}, 237 237 {"ko-depth", required_argument, 0, 'K'}, … … 391 391 break; 392 392 393 393 case 'o': 394 if (strlen(gg_optarg) >= sizeof(outfilename)) { 395 fprintf(stderr, "Too long filename given as value to -o option.\n"); 396 exit(EXIT_FAILURE); 397 } 394 398 outfile = gg_optarg; 395 399 strcpy(outfilename, gg_optarg); 396 400 break; … … 475 479 "configure option enabled: owl threats\n"); 476 480 if (RESIGNATION_ALLOWED) 477 481 fprintf(stdout, 478 "configure option enabled: resi nation allowed\n");482 "configure option enabled: resignation allowed\n"); 479 483 if (ORACLE) 480 484 fprintf(stdout, 481 485 "configure option enabled: oracle\n"); … … 1749 1753 } 1750 1754 1751 1755 if (! *address_pointer) { 1752 fprintf(stderr, "Failed to connect to %s:% d\n", host_data->h_name, port);1756 fprintf(stderr, "Failed to connect to %s:%u\n", host_data->h_name, port); 1753 1757 closesocket(connection_socket); 1754 1758 exit(EXIT_FAILURE); 1755 1759 } … … 1809 1813 1810 1814 if (verbose) { 1811 1815 if (host_name) { 1812 fprintf(stderr, "Waiting for a connection on %s:% d...\n",1816 fprintf(stderr, "Waiting for a connection on %s:%u...\n", 1813 1817 host_name, port); 1814 1818 } 1815 1819 else 1816 fprintf(stderr, "Waiting for a connection on port % d...\n", port);1820 fprintf(stderr, "Waiting for a connection on port %u...\n", port); 1817 1821 } 1818 1822 1819 1823 if (bind(listening_socket, … … 1821 1825 || listen(listening_socket, 0) == -1 1822 1826 || (connection_socket = accept(listening_socket, NULL, NULL)) == -1) { 1823 1827 if (host_name) 1824 fprintf(stderr, "Failed to listen on %s:% d\n", host_name, port);1828 fprintf(stderr, "Failed to listen on %s:%u\n", host_name, port); 1825 1829 else 1826 fprintf(stderr, "Failed to listen on port % d\n", port);1830 fprintf(stderr, "Failed to listen on port %u\n", port); 1827 1831 1828 1832 closesocket(listening_socket); 1829 1833 exit(EXIT_FAILURE); -
utils/gg_utils.c
246 246 * if available, otherwise substituting a workaround for portability. 247 247 */ 248 248 249 static int 250 gg_gettimeofday 2(struct timeval *tv)249 double 250 gg_gettimeofday(void) 251 251 { 252 struct timeval tv; 252 253 #ifdef HAVE_GETTIMEOFDAY 253 return gettimeofday(tv, NULL);254 gettimeofday(&tv, NULL); 254 255 #else 255 if (tv != NULL) { 256 tv->tv_sec = time(NULL); 257 tv->tv_usec = 0; 258 } 259 return 1; 256 tv->tv_sec = time(NULL); 257 tv->tv_usec = 0; 260 258 #endif 259 return tv.tv_sec + 1.e-6 * tv.tv_usec; 261 260 } 262 261 263 double264 gg_gettimeofday(void)265 {266 struct timeval tv;267 gg_gettimeofday2(&tv);268 return tv.tv_sec + 1.e-6*tv.tv_usec;269 }270 271 262 const char * 272 263 gg_version(void) 273 264 { -
engine/interface.c
191 191 *upper = white_score; 192 192 if (lower != NULL) 193 193 *lower = black_score; 194 return ((white_score + black_score) /2.0);194 return ((white_score + black_score) / 2.0); 195 195 } 196 196 197 197 -
engine/utils.c
40 40 */ 41 41 42 42 void 43 change_dragon_status(int dr, intstatus)43 change_dragon_status(int dr, enum dragon_status status) 44 44 { 45 45 int pos; 46 46 int origin = dragon[dr].origin; -
engine/owl.c
315 315 int goal_worm[MAX_GOAL_WORMS]); 316 316 317 317 /* FIXME: taken from move_reasons.h */ 318 #define MAX_DRAGONS 2 *MAX_BOARD*MAX_BOARD/3318 #define MAX_DRAGONS 2 * MAX_BOARD * MAX_BOARD / 3 319 319 320 320 static int dragon_goal_worms[MAX_DRAGONS][MAX_GOAL_WORMS]; 321 321 … … 2759 2759 current_owl_data = owl; 2760 2760 memset(owl->safe_move_cache, 0, sizeof(owl->safe_move_cache)); 2761 2761 2762 /* First see whether we might already be ali fe. */2762 /* First see whether we might already be alive. */ 2763 2763 if (escape < MAX_ESCAPE) { 2764 2764 if (owl_estimate_life(owl, NULL, vital_moves, &live_reason, 0, 2765 2765 &probable_eyes, &eyemin, &eyemax)) { … … 4939 4939 count_variations = 0; 4940 4940 4941 4941 if (same_dragon == SAME_DRAGON_NOT_CONNECTED) 4942 num_stones = findstones(pos, MAX_BOARD *MAX_BOARD, stones);4942 num_stones = findstones(pos, MAX_BOARD * MAX_BOARD, stones); 4943 4943 else if (semeai_call) 4944 4944 find_superstring_conservative(pos, &num_stones, stones); 4945 4945 else … … 6678 6678 int pos; 6679 6679 int m, n; 6680 6680 signed char safe_stones[BOARDMAX]; 6681 SGFTree *save_sgf_dumptree = sgf_dumptree; 6682 int save_count_variations = count_variations; 6681 6683 signed char mx[BOARDMAX]; 6682 6684 memset(mx, 0, sizeof(mx)); 6683 6685 6686 sgf_dumptree = NULL; 6687 count_variations = 0; 6684 6688 get_lively_stones(OTHER_COLOR(owl->color), safe_stones); 6689 sgf_dumptree = save_sgf_dumptree; 6690 count_variations = save_count_variations; 6691 6685 6692 compute_escape_influence(owl->color, safe_stones, NULL, NULL, 6686 6693 owl->escape_values); 6687 6694 -
engine/reading.c
1636 1636 static int 1637 1637 defend3(int str, int *move) 1638 1638 { 1639 int color , other;1639 int color; 1640 1640 int xpos = NO_MOVE; 1641 1641 int liberties; 1642 1642 int libs[3]; … … 1650 1650 reading_node_counter++; 1651 1651 1652 1652 color = board[str]; 1653 other = OTHER_COLOR(color);1654 1653 1655 1654 ASSERT1(IS_STONE(board[str]), str); 1656 1655 ASSERT1(countlib(str) == 3, str); … … 1690 1689 #if 0 1691 1690 /* Look for backfilling moves. */ 1692 1691 if (stackp <= backfill_depth) { 1692 int other = OTHER_COLOR(color); 1693 1693 int liberties2; 1694 1694 int libs2[6]; 1695 1695 int r; -
engine/dragon.c
68 68 int eye_color, struct eye_data *eye, 69 69 signed char *mx, signed char *me, 70 70 int *halfeyes); 71 static intcompute_crude_status(int pos);71 static enum dragon_status compute_crude_status(int pos); 72 72 static int compute_escape(int pos, int dragon_status_known); 73 73 static void compute_surrounding_moyo_sizes(const struct influence_data *q); 74 74 static void clear_cut_list(void); … … 1739 1739 * the genus is <2, it has no escape route, and no adjoining string can 1740 1740 * be easily captured. Otherwise it is judged UNKNOWN. */ 1741 1741 1742 static int1742 static enum dragon_status 1743 1743 compute_crude_status(int pos) 1744 1744 { 1745 1745 /* FIXME: We lose information when constructing true_genus. This … … 2363 2363 * the dragon structure to the external program. 2364 2364 */ 2365 2365 2366 int 2366 enum dragon_status 2367 2367 crude_status(int pos) 2368 2368 { 2369 2369 return dragon[pos].crude_status; 2370 2370 } 2371 2371 2372 2372 2373 int 2373 enum dragon_status 2374 2374 dragon_status(int pos) 2375 2375 { 2376 2376 return dragon[pos].status; -
engine/liberty.h
291 291 int dragon_weak(int pos); 292 292 float dragon_weakness(int pos, int ignore_dead_dragons); 293 293 int size_of_biggest_critical_dragon(void); 294 void change_dragon_status(int dr, enum dragon_status status); 294 295 float blunder_size(int move, int color, int *defense_point, 295 296 signed char safe_stones[BOARDMAX]); 296 297 void set_depth_values(int level, int report_levels); … … 898 899 int moyo_size; /* size of surrounding influence moyo, */ 899 900 float moyo_territorial_value; /* ...and its territorial value */ 900 901 enum dragon_status safety; /* a more detailed status estimate */ 901 float weakness; /* A new (3.4)continuous estimate of the dragon's safety */902 float weakness_pre_owl; /* Dragon safety based on pre-owl computations*/902 float weakness; /* a continuous estimate of the dragon's safety */ 903 float weakness_pre_owl; /* dragon safety based on pre-owl computations */ 903 904 float strategic_size; /* An effective size including weakness of neighbors */ 904 int escape_route; /* a measurement of likelihood of escape*/905 int escape_route; /* a measurement of likelihood of escape */ 905 906 struct eyevalue genus; /* the number of eyes (approximately) */ 906 907 int heye; /* coordinates of a half eye */ 907 908 int lunch; /* if lunch != 0 then lunch points to a boundary worm which */ -
engine/gnugo.h
127 127 extern int printboard; /* print board each move */ 128 128 extern int showstatistics; /* print statistics */ 129 129 extern int profile_patterns; /* print statistics of pattern usage */ 130 extern char outfilename[128]; /* output file (-o option) */131 extern int output_flags; /* amount of output to outfile */130 extern char outfilename[128]; /* output file (-o option) */ 131 extern int output_flags; /* amount of output to outfile */ 132 132 133 133 /* output flag bits */ 134 134 #define OUTPUT_MARKDRAGONS 0x0001 /* mark dead and critical dragons */ … … 222 222 extern int use_monte_carlo_genmove; /* use Monte Carlo move generation */ 223 223 extern int mc_games_per_level; /* number of Monte Carlo simulations per level */ 224 224 225 /* Mandatory values of reading parameters. Normally -1, if set at225 /* Mandatory values of reading parameters. Normally -1, if set 226 226 * these override the values derived from the level. */ 227 227 extern int mandated_depth; 228 228 extern int mandated_backfill_depth; … … 267 267 void end_draw_board(void); 268 268 void showboard(int xo); /* ascii rep. of board to stderr */ 269 269 270 double gg_gettimeofday(void);271 270 272 273 271 /* influence.c */ 274 272 void debug_influence_move(int move); 275 273 … … 327 325 /* ================================================================ */ 328 326 329 327 /* utils.c */ 330 void change_dragon_status(int dr, int status);331 328 void who_wins(int color, FILE *outfile); 332 329 333 330 /* high-level routine to generate the best move for the given color */ … … 346 343 void make_dragons(int stop_before_owl); 347 344 void initialize_dragon_data(void); 348 345 void show_dragons(void); 349 intcrude_status(int pos);350 intdragon_status(int pos);346 enum dragon_status crude_status(int pos); 347 enum dragon_status dragon_status(int pos); 351 348 int same_dragon(int dr1, int dr2); 352 349 353 350 /* debugging functions */ -
engine/value_moves.c
3080 3080 } 3081 3081 3082 3082 /* Introduction of strategical_weight and territorial_weight, 3083 for automatic fitting (3.5.1) */ 3083 * for automatic fitting. (3.5.1) 3084 */ 3084 3085 tot_value = territorial_weight * move[pos].territorial_value + 3085 3086 strategical_weight * move[pos].strategical_value; 3086 3087 -
engine/fuseki.c
286 286 struct fullboard_pattern *database; 287 287 int q; 288 288 int k; 289 int best_fuseki_value;290 289 291 290 /* Disable matching after a certain number of stones are placed on 292 291 * the board. … … 315 314 316 315 /* Choose randomly with respect to relative weights for matched moves. 317 316 */ 318 best_fuseki_value = fuseki_value[0];319 317 q = gg_rand() % fuseki_total_value; 320 318 for (k = 0; k < num_fuseki_moves; k++) { 321 319 q -= fuseki_value[k]; -
engine/move_reasons.c
469 469 int 470 470 attack_move_reason_known(int pos, int what) 471 471 { 472 ASSERT1( IS_STONE(board[what]), what);472 ASSERT1(what < 0 || IS_STONE(board[what]), what); 473 473 what = worm[what].origin; 474 474 if (move_reason_known(pos, ATTACK_MOVE, what)) 475 475 return WIN; … … 487 487 int 488 488 defense_move_reason_known(int pos, int what) 489 489 { 490 ASSERT1( IS_STONE(board[what]), what);490 ASSERT1(what < 0 || IS_STONE(board[what]), what); 491 491 what = worm[what].origin; 492 492 if (move_reason_known(pos, DEFEND_MOVE, what)) 493 493 return WIN; -
engine/matchpat.c
62 62 *total_hits += pattern->hits; 63 63 *total_nodes += pattern->reading_nodes; 64 64 *total_dfa_hits += pattern->dfa_hits; 65 fprintf(stderr, "%6d ", pattern->dfa_hits);66 fprintf(stderr, "%6d %9d %8.1f %s\n", 65 fprintf(stderr, "%6d %6d %9d %8.1f %s\n", 66 pattern->dfa_hits, 67 67 pattern->hits, 68 68 pattern->reading_nodes, 69 69 pattern->reading_nodes / (float) pattern->hits, -
engine/montecarlo.c
1117 1117 } 1118 1118 1119 1119 1120 static int mc_play_random_move(struct mc_game *game, int move , int in_uct_tree)1120 static int mc_play_random_move(struct mc_game *game, int move) 1121 1121 { 1122 1122 int result = mc_play_move(&game->mc, move, game->color_to_move); 1123 1123 … … 1154 1154 /* First finish the game, if it isn't already. */ 1155 1155 while (game->consecutive_passes < 3) { 1156 1156 move = mc_generate_random_move(game, 0); 1157 result = mc_play_random_move(game, move , 0);1157 result = mc_play_random_move(game, move); 1158 1158 ASSERT1(result, move); 1159 1159 } 1160 1160 … … 1421 1421 proper_small_eye = 0; 1422 1422 } 1423 1423 1424 if (!proper_small_eye && mc_play_random_move(&tree->game, *move , 1))1424 if (!proper_small_eye && mc_play_random_move(&tree->game, *move)) 1425 1425 return uct_find_node(tree, node, *move); 1426 1426 } 1427 1427 } 1428 1428 } 1429 1429 1430 1430 if (!next_arc) { 1431 mc_play_random_move(&tree->game, PASS_MOVE , 1);1431 mc_play_random_move(&tree->game, PASS_MOVE); 1432 1432 *move = PASS_MOVE; 1433 1433 return uct_find_node(tree, node, PASS_MOVE); 1434 1434 } 1435 1435 1436 1436 *move = next_arc->move; 1437 mc_play_random_move(&tree->game, next_arc->move , 1);1437 mc_play_random_move(&tree->game, next_arc->move); 1438 1438 1439 1439 return next_arc->node; 1440 1440 } -
engine/sgfdecide.c
389 389 if (*outfilename) 390 390 sgffile_begindump(&tree); 391 391 392 /* FIXME: Calling status_to_string() with a result code as argument 393 * doesn't make sense. It could be changed to result_to_string() but 394 * the overall formatting needs change as well. 395 */ 392 396 owl_analyze_semeai(apos, bpos, &resulta, &resultb, &move, 0, &dummy); 393 397 gprintf("After %s at %1m, %1m is %s, %1m is %s (%d nodes)\n", 394 398 color_to_string(color), -
engine/board.c
1079 1079 is_legal(int pos, int color) 1080 1080 { 1081 1081 /* 0. A pass move is always legal. */ 1082 if (pos == 0)1082 if (pos == PASS_MOVE) 1083 1083 return 1; 1084 1084 1085 1085 /* 1. The move must be inside the board. */ -
engine/clock.c
96 96 void 97 97 clock_print(int color) 98 98 { 99 struct timer_data *const td99 struct timer_data *const td 100 100 = (color == BLACK) ? &black_time_data : &white_time_data; 101 101 102 102 fprintf(stderr, "clock: "); … … 181 181 void 182 182 update_time_left(int color, int time_left, int stones) 183 183 { 184 struct timer_data *const td184 struct timer_data *const td 185 185 = ((color == BLACK) ? &black_time_data : &white_time_data); 186 186 int time_used = td->official.time_left - time_left; 187 187 … … 219 219 { 220 220 static double last_time = -1.0; 221 221 static int last_movenum = -1; 222 struct timer_data *const td222 struct timer_data *const td 223 223 = (color == BLACK) ? &black_time_data : &white_time_data; 224 224 double now = gg_gettimeofday(); 225 225 … … 282 282 analyze_time_data(int color, double *time_for_last_move, double *time_left, 283 283 int *stones_left) 284 284 { 285 struct remaining_time_data * const timer285 struct remaining_time_data *const timer 286 286 = (color == BLACK) ? &black_time_data.estimated 287 287 : &white_time_data.estimated; 288 288
