Ticket #198: gunnar_7_12.6.diff

File gunnar_7_12.6.diff, 25.5 KB (added by gunnar, 4 years ago)

Maintenance patch.

  • patterns/eyes.h

     
    3434 */ 
    3535 
    3636struct 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      */ 
    3939  /* A corner vertex may only be matched at the corner. 
    4040   * An edge vertex may be matched at the corner or on the edge. 
    4141   * A center vertex may be matched anywhere. 
    4242   */ 
    43   char flags;                     /* see the #defines above                */ 
     43  signed char flags;              /* see the #defines above                */ 
    4444 
    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 */ 
    4747}; 
    4848 
    4949 
     
    5454 
    5555struct eye_graph { 
    5656  struct eye_vertex *vertex; 
    57   int patnum;                     /* Number of pattern                      */ 
     57  int patnum;                     /* number of pattern                     */ 
    5858  int esize;                      /* number of vertices                    */ 
    5959  int msize;                      /* number of marginal vertices           */ 
    6060  int ends;                       /* number of vertices with one neighbor  */ 
  • patterns/patterns.db

     
    73497349 
    73507350:8,OE 
    73517351 
     7352?O...? 
     7353?..*.? 
    73527354?a...? 
    7353 ?..*.? 
    7354 ?b...? 
    73557355?????? 
    73567356 
    7357 ;xarea(*) && oarea(b) 
     7357;xarea(*) && oarea(a) 
    73587358 
    73597359 
    73607360Pattern CB106 
  • patterns/uncompress_fuseki.c

     
    101101#define C_HEADER "struct fullboard_pattern fuseki%d[] = {\n" 
    102102#define C_FOOTER "};\n" 
    103103   
    104 const char *const db_output_strings[3] = 
     104static const char *const db_output_strings[3] = 
    105105  {DB_PREAMBLE, DB_HEADER, DB_FOOTER}; 
    106 const char *const c_output_strings[3] = 
     106static const char *const c_output_strings[3] = 
    107107  {C_PREAMBLE, C_HEADER, C_FOOTER}; 
    108108 
    109109#define PREAMBLE        0 
  • patterns/mkeyes.c

     
    2626/* see also eyes.db, eyes.h and engine/optics.c */ 
    2727 
    2828 
    29 #define MAX_BOARD 19 
    3029#define MAXLINE 80 
    3130#define MAXDIMEN 20 
    3231#define MAXSIZE 20 
  • doc/using.texi

     
    541541@option{-l} and @option{-L} to create a diagram of the board from 
    542542another sgf file. Illegal moves are indicated with the private 
    543543@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}.   
     544specification, so we are free to preempt it. 
    546545@end quotation 
    547546@item @option{--options} 
    548547@quotation  
     
    621620depth (default 13), GNU Go still tries to attack strings with only 
    6226213 liberties, but only tries one move at each node. 
    623622@end quotation 
    624 @item @option{--break_chain-cutoff @var{depth}} 
     623@item @option{--break-chain-depth @var{depth}} 
    625624@quotation 
    626625Set the @code{break_chain_depth}. Beyond this depth, GNU Go abandons 
    627626some attempts to defend groups by trying to capture part of the surrounding 
  • doc/introduction.texi

     
    5757by the Free Software Foundation except as noted below. 
    5858 
    5959All 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}. 
     60except @file{gmp.c}, @file{gmp.h}, @file{gtp.c}, and @file{gtp.h}. 
    6261 
    6362The files @file{gtp.c} and @file{gtp.h} are copyright the Free Software 
    6463Foundation. In the interests of promoting the Go Text Protocol these 
     
    6867The two files @file{gmp.c} and @file{gmp.h} were placed in the public domain 
    6968by William Shubert, their author, and are free for unrestricted use. 
    7069 
    71 The files @file{interface/html/*} are not part of GNU Go but are a separate 
    72 program and are included in the distribution for the convenience of anyone 
    73 looking for a CGI interface to GNU Go. They were placed in the public domain 
    74 by their author, Douglas Ridgway, and are free for unrestricted use. 
    75  
    7670The files @file{regression/games/golois/*sgf} are copyright Tristan 
    7771Cazenave and are included with his permission. 
    7872 
  • configure.in

     
    4949dnl and look to see if they want to disable the grid optimisation 
    5050 
    5151AC_ARG_ENABLE(grid-opt, 
    52  [  --enable-grid-opt           enable the grid optimsation within the pattern 
     52 [  --enable-grid-opt           enable the grid optimisation within the pattern 
    5353                                matcher (default) 
    54   --enable-grid-opt=distrust  enable the grid optimsation in non-trusting mode 
     54  --enable-grid-opt=distrust  enable the grid optimisation in non-trusting mode 
    5555  --disable-grid-opt          disable the grid optimisation]) 
    5656 
    5757default_cache_size=-1 
  • README

     
    231231* The files gmp.c and gmp.h are copyright Bill Shubert. These 
    232232  are free for unrestricted use. 
    233233 
    234 * The files interface/html/* are not part of GNU Go but are a separate 
    235   probram and are included in the distribution for the convenience of anyone 
    236   looking for a CGI interface to GNU Go. They were placed in the public domain 
    237   by their author, Douglas Ridgway, and are free for unrestricted use. 
    238  
    239234* The files regression/golois/* and the tests vie.tst, connect.tst, 
    240235  capture.tst and global.tst are copyright Tristan Cazenave and are 
    241236  used with his permission 
  • interface/gtp_examples/twogtp.pike

     
    758758 
    759759        if (move_lower_case == "pass") { 
    760760          if (verbose) 
    761             werror(player->capitalized_color + " passes\n"); 
     761            werror("play " + player->capitalized_color + " pass\n"); 
    762762 
    763763          if (++passes == 2) 
    764764            break; 
     
    769769            if (time_left == " ()") 
    770770              time_left = ""; 
    771771 
    772             werror("%s plays %s%s\n", player->capitalized_color, 
     772            werror("play %s %s%s\n", player->capitalized_color, 
    773773                   move, time_left); 
    774774          } 
    775775 
  • interface/play_ascii.c

     
    951951          tmpstring = strtok(NULL, " "); 
    952952          if (tmpstring) { 
    953953            /* discard newline */ 
    954             tmpstring[strlen(tmpstring)-1] = 0; 
     954            tmpstring[strlen(tmpstring) - 1] = 0; 
    955955            /* make sure we are saving proper handicap */ 
    956956            init_sgf(gameinfo); 
    957957            writesgf(sgftree.root, tmpstring); 
     
    968968          tmpstring = strtok(NULL, " "); 
    969969          if (tmpstring) { 
    970970            /* discard newline */ 
    971             tmpstring[strlen(tmpstring)-1] = 0; 
     971            tmpstring[strlen(tmpstring) - 1] = 0; 
    972972            if (!sgftree_readfile(&sgftree, tmpstring)) { 
    973973              fprintf(stderr, "Cannot open or parse '%s'\n", tmpstring); 
    974974              break; 
     
    10701070      tmpstring = strtok(NULL, " "); 
    10711071      if (tmpstring) { 
    10721072        /* discard newline */ 
    1073         tmpstring[strlen(tmpstring)-1] = 0; 
     1073        tmpstring[strlen(tmpstring) - 1] = 0; 
    10741074        init_sgf(gameinfo); 
    10751075        writesgf(sgftree.root, tmpstring); 
    10761076      } 
     
    11601160      if (pos == NO_MOVE || board[pos] == EMPTY) 
    11611161        printf("\ninvalid!\n"); 
    11621162      else { 
    1163         int status = dragon_status(pos); 
     1163        enum dragon_status status = dragon_status(pos); 
    11641164        status = (status == DEAD) ? ALIVE : DEAD; 
    11651165        change_dragon_status(pos, status); 
    11661166        ascii_showboard(); 
  • interface/play_gtp.c

     
    20022002  owl_analyze_semeai(dragona, dragonb, &resulta, &resultb, &move, 0, 
    20032003                     &result_certain); 
    20042004  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)); 
    20092009  if (!result_certain && report_uncertainty) 
    20102010    gtp_printf(" uncertain"); 
    20112011 
  • interface/main.c

     
    231231  {"backfill-depth", required_argument, 0, 'B'}, 
    232232  {"branch-depth",   required_argument, 0, OPT_BRANCH_DEPTH}, 
    233233  {"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}, 
    235235  {"superstring-depth", required_argument, 0, OPT_SUPERSTRING_DEPTH}, 
    236236  {"fourlib-depth",  required_argument, 0, 'F'}, 
    237237  {"ko-depth",       required_argument, 0, 'K'}, 
     
    391391        break; 
    392392         
    393393      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        } 
    394398        outfile = gg_optarg; 
    395399        strcpy(outfilename, gg_optarg); 
    396400        break; 
     
    475479                  "configure option enabled: owl threats\n"); 
    476480        if (RESIGNATION_ALLOWED) 
    477481          fprintf(stdout, 
    478                   "configure option enabled: resination allowed\n"); 
     482                  "configure option enabled: resignation allowed\n"); 
    479483        if (ORACLE) 
    480484          fprintf(stdout, 
    481485                  "configure option enabled: oracle\n"); 
     
    17491753  } 
    17501754 
    17511755  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); 
    17531757    closesocket(connection_socket); 
    17541758    exit(EXIT_FAILURE); 
    17551759  } 
     
    18091813 
    18101814  if (verbose) { 
    18111815    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", 
    18131817              host_name, port); 
    18141818    } 
    18151819    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); 
    18171821  } 
    18181822 
    18191823  if (bind(listening_socket, 
     
    18211825      || listen(listening_socket, 0) == -1 
    18221826      || (connection_socket = accept(listening_socket, NULL, NULL)) == -1) { 
    18231827    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); 
    18251829    else 
    1826       fprintf(stderr, "Failed to listen on port %d\n", port); 
     1830      fprintf(stderr, "Failed to listen on port %u\n", port); 
    18271831 
    18281832    closesocket(listening_socket); 
    18291833    exit(EXIT_FAILURE); 
  • utils/gg_utils.c

     
    246246 * if available, otherwise substituting a workaround for portability. 
    247247 */ 
    248248 
    249 static int 
    250 gg_gettimeofday2(struct timeval *tv) 
     249double 
     250gg_gettimeofday(void) 
    251251{ 
     252  struct timeval tv; 
    252253#ifdef HAVE_GETTIMEOFDAY 
    253   return gettimeofday(tv, NULL); 
     254  gettimeofday(&tv, NULL); 
    254255#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; 
    260258#endif 
     259  return tv.tv_sec + 1.e-6 * tv.tv_usec; 
    261260} 
    262261 
    263 double 
    264 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  
    271262const char * 
    272263gg_version(void) 
    273264{ 
  • engine/interface.c

     
    191191    *upper = white_score; 
    192192  if (lower != NULL) 
    193193    *lower = black_score; 
    194   return ((white_score + black_score)/2.0); 
     194  return ((white_score + black_score) / 2.0); 
    195195} 
    196196 
    197197 
  • engine/utils.c

     
    4040 */ 
    4141 
    4242void 
    43 change_dragon_status(int dr, int status) 
     43change_dragon_status(int dr, enum dragon_status status) 
    4444{ 
    4545  int pos; 
    4646  int origin = dragon[dr].origin; 
  • engine/owl.c

     
    315315                           int goal_worm[MAX_GOAL_WORMS]); 
    316316 
    317317/* FIXME: taken from move_reasons.h */ 
    318 #define MAX_DRAGONS       2*MAX_BOARD*MAX_BOARD/3 
     318#define MAX_DRAGONS       2 * MAX_BOARD * MAX_BOARD / 3 
    319319 
    320320static int dragon_goal_worms[MAX_DRAGONS][MAX_GOAL_WORMS]; 
    321321 
     
    27592759  current_owl_data = owl; 
    27602760  memset(owl->safe_move_cache, 0, sizeof(owl->safe_move_cache)); 
    27612761 
    2762   /* First see whether we might already be alife. */ 
     2762  /* First see whether we might already be alive. */ 
    27632763  if (escape < MAX_ESCAPE) { 
    27642764    if (owl_estimate_life(owl, NULL, vital_moves, &live_reason, 0, 
    27652765                          &probable_eyes, &eyemin, &eyemax)) { 
     
    49394939  count_variations = 0; 
    49404940   
    49414941  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); 
    49434943  else if (semeai_call) 
    49444944    find_superstring_conservative(pos, &num_stones, stones); 
    49454945  else 
     
    66786678  int pos; 
    66796679  int m, n; 
    66806680  signed char safe_stones[BOARDMAX]; 
     6681  SGFTree *save_sgf_dumptree = sgf_dumptree; 
     6682  int save_count_variations = count_variations; 
    66816683  signed char mx[BOARDMAX]; 
    66826684  memset(mx, 0, sizeof(mx)); 
    6683    
     6685     
     6686  sgf_dumptree = NULL; 
     6687  count_variations = 0; 
    66846688  get_lively_stones(OTHER_COLOR(owl->color), safe_stones); 
     6689  sgf_dumptree = save_sgf_dumptree; 
     6690  count_variations = save_count_variations; 
     6691 
    66856692  compute_escape_influence(owl->color, safe_stones, NULL, NULL, 
    66866693                           owl->escape_values); 
    66876694 
  • engine/reading.c

     
    16361636static int  
    16371637defend3(int str, int *move) 
    16381638{ 
    1639   int color, other; 
     1639  int color; 
    16401640  int xpos = NO_MOVE; 
    16411641  int liberties; 
    16421642  int libs[3]; 
     
    16501650  reading_node_counter++; 
    16511651 
    16521652  color = board[str]; 
    1653   other = OTHER_COLOR(color); 
    16541653 
    16551654  ASSERT1(IS_STONE(board[str]), str); 
    16561655  ASSERT1(countlib(str) == 3, str); 
     
    16901689#if 0 
    16911690  /* Look for backfilling moves. */ 
    16921691  if (stackp <= backfill_depth) { 
     1692    int other = OTHER_COLOR(color); 
    16931693    int liberties2; 
    16941694    int libs2[6]; 
    16951695    int r; 
  • engine/dragon.c

     
    6868                                     int eye_color, struct eye_data *eye, 
    6969                                     signed char *mx, signed char *me, 
    7070                                     int *halfeyes); 
    71 static int compute_crude_status(int pos); 
     71static enum dragon_status compute_crude_status(int pos); 
    7272static int compute_escape(int pos, int dragon_status_known); 
    7373static void compute_surrounding_moyo_sizes(const struct influence_data *q); 
    7474static void clear_cut_list(void); 
     
    17391739 * the genus is <2, it has no escape route, and no adjoining string can 
    17401740 * be easily captured. Otherwise it is judged UNKNOWN.  */ 
    17411741 
    1742 static int  
     1742static enum dragon_status 
    17431743compute_crude_status(int pos) 
    17441744{ 
    17451745  /* FIXME: We lose information when constructing true_genus. This 
     
    23632363 * the dragon structure to the external program. 
    23642364 */ 
    23652365 
    2366 int 
     2366enum dragon_status 
    23672367crude_status(int pos) 
    23682368{ 
    23692369  return dragon[pos].crude_status; 
    23702370} 
    23712371 
    23722372 
    2373 int 
     2373enum dragon_status 
    23742374dragon_status(int pos) 
    23752375{ 
    23762376  return dragon[pos].status; 
  • engine/liberty.h

     
    291291int dragon_weak(int pos); 
    292292float dragon_weakness(int pos, int ignore_dead_dragons); 
    293293int size_of_biggest_critical_dragon(void); 
     294void change_dragon_status(int dr, enum dragon_status status); 
    294295float blunder_size(int move, int color, int *defense_point, 
    295296                   signed char safe_stones[BOARDMAX]); 
    296297void set_depth_values(int level, int report_levels); 
     
    898899  int moyo_size;                      /* size of surrounding influence moyo, */ 
    899900  float moyo_territorial_value;       /* ...and its territorial value        */ 
    900901  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  */ 
    903904  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         */ 
    905906  struct eyevalue genus;    /* the number of eyes (approximately)            */ 
    906907  int heye;     /* coordinates of a half eye                                 */ 
    907908  int lunch;    /* if lunch != 0 then lunch points to a boundary worm which  */ 
  • engine/gnugo.h

     
    127127extern int printboard;          /* print board each move */ 
    128128extern int showstatistics;      /* print statistics */ 
    129129extern 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 */ 
     130extern char outfilename[128];   /* output file (-o option) */ 
     131extern int output_flags;        /* amount of output to outfile */ 
    132132 
    133133/* output flag bits */ 
    134134#define OUTPUT_MARKDRAGONS         0x0001  /* mark dead and critical dragons */ 
     
    222222extern int use_monte_carlo_genmove;  /* use Monte Carlo move generation */ 
    223223extern int mc_games_per_level;       /* number of Monte Carlo simulations per level */ 
    224224 
    225 /* Mandatory values of reading parameters. Normally -1, if set at  
     225/* Mandatory values of reading parameters. Normally -1, if set 
    226226 * these override the values derived from the level. */ 
    227227extern int mandated_depth; 
    228228extern int mandated_backfill_depth; 
     
    267267void end_draw_board(void); 
    268268void showboard(int xo);  /* ascii rep. of board to stderr */ 
    269269 
    270 double gg_gettimeofday(void); 
    271270 
    272  
    273271/* influence.c */ 
    274272void debug_influence_move(int move); 
    275273 
     
    327325/* ================================================================ */ 
    328326 
    329327/* utils.c */ 
    330 void change_dragon_status(int dr, int status); 
    331328void who_wins(int color, FILE *outfile); 
    332329 
    333330/* high-level routine to generate the best move for the given color */ 
     
    346343void make_dragons(int stop_before_owl); 
    347344void initialize_dragon_data(void); 
    348345void show_dragons(void); 
    349 int crude_status(int pos); 
    350 int dragon_status(int pos); 
     346enum dragon_status crude_status(int pos); 
     347enum dragon_status dragon_status(int pos); 
    351348int same_dragon(int dr1, int dr2); 
    352349 
    353350/* debugging functions */ 
  • engine/value_moves.c

     
    30803080  } 
    30813081 
    30823082  /* Introduction of strategical_weight and territorial_weight,  
    3083      for automatic fitting (3.5.1) */ 
     3083   * for automatic fitting. (3.5.1) 
     3084   */ 
    30843085  tot_value = territorial_weight * move[pos].territorial_value +  
    30853086              strategical_weight * move[pos].strategical_value; 
    30863087 
  • engine/fuseki.c

     
    286286  struct fullboard_pattern *database; 
    287287  int q; 
    288288  int k; 
    289   int best_fuseki_value; 
    290289 
    291290  /* Disable matching after a certain number of stones are placed on 
    292291   * the board. 
     
    315314 
    316315  /* Choose randomly with respect to relative weights for matched moves. 
    317316   */ 
    318   best_fuseki_value = fuseki_value[0]; 
    319317  q = gg_rand() % fuseki_total_value; 
    320318  for (k = 0; k < num_fuseki_moves; k++) { 
    321319    q -= fuseki_value[k]; 
  • engine/move_reasons.c

     
    469469int 
    470470attack_move_reason_known(int pos, int what) 
    471471{ 
    472   ASSERT1(IS_STONE(board[what]), what); 
     472  ASSERT1(what < 0 || IS_STONE(board[what]), what); 
    473473  what = worm[what].origin; 
    474474  if (move_reason_known(pos, ATTACK_MOVE, what)) 
    475475    return WIN; 
     
    487487int 
    488488defense_move_reason_known(int pos, int what) 
    489489{ 
    490   ASSERT1(IS_STONE(board[what]), what); 
     490  ASSERT1(what < 0 || IS_STONE(board[what]), what); 
    491491  what = worm[what].origin; 
    492492  if (move_reason_known(pos, DEFEND_MOVE, what)) 
    493493    return WIN; 
  • engine/matchpat.c

     
    6262      *total_hits += pattern->hits; 
    6363      *total_nodes += pattern->reading_nodes; 
    6464      *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, 
    6767              pattern->hits, 
    6868              pattern->reading_nodes, 
    6969              pattern->reading_nodes / (float) pattern->hits,  
  • engine/montecarlo.c

     
    11171117} 
    11181118 
    11191119 
    1120 static int mc_play_random_move(struct mc_game *game, int move, int in_uct_tree) 
     1120static int mc_play_random_move(struct mc_game *game, int move) 
    11211121{ 
    11221122  int result = mc_play_move(&game->mc, move, game->color_to_move); 
    11231123 
     
    11541154  /* First finish the game, if it isn't already. */ 
    11551155  while (game->consecutive_passes < 3) { 
    11561156    move = mc_generate_random_move(game, 0); 
    1157     result = mc_play_random_move(game, move, 0); 
     1157    result = mc_play_random_move(game, move); 
    11581158    ASSERT1(result, move); 
    11591159  } 
    11601160 
     
    14211421            proper_small_eye = 0; 
    14221422        } 
    14231423         
    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)) 
    14251425          return uct_find_node(tree, node, *move); 
    14261426      } 
    14271427    } 
    14281428  } 
    14291429   
    14301430  if (!next_arc) { 
    1431     mc_play_random_move(&tree->game, PASS_MOVE, 1); 
     1431    mc_play_random_move(&tree->game, PASS_MOVE); 
    14321432    *move = PASS_MOVE; 
    14331433    return uct_find_node(tree, node, PASS_MOVE); 
    14341434  } 
    14351435 
    14361436  *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); 
    14381438   
    14391439  return next_arc->node; 
    14401440} 
  • engine/sgfdecide.c

     
    389389  if (*outfilename) 
    390390    sgffile_begindump(&tree); 
    391391 
     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   */ 
    392396  owl_analyze_semeai(apos, bpos, &resulta, &resultb, &move, 0, &dummy); 
    393397  gprintf("After %s at %1m, %1m is %s, %1m is %s (%d nodes)\n", 
    394398          color_to_string(color), 
  • engine/board.c

     
    10791079is_legal(int pos, int color) 
    10801080{ 
    10811081  /* 0. A pass move is always legal. */ 
    1082   if (pos == 0) 
     1082  if (pos == PASS_MOVE) 
    10831083    return 1; 
    10841084 
    10851085  /* 1. The move must be inside the board. */ 
  • engine/clock.c

     
    9696void 
    9797clock_print(int color) 
    9898{ 
    99   struct timer_data* const td 
     99  struct timer_data *const td 
    100100    = (color == BLACK) ? &black_time_data : &white_time_data; 
    101101 
    102102  fprintf(stderr, "clock: ");  
     
    181181void 
    182182update_time_left(int color, int time_left, int stones) 
    183183{ 
    184   struct timer_data* const td 
     184  struct timer_data *const td 
    185185    = ((color == BLACK) ? &black_time_data : &white_time_data); 
    186186  int time_used = td->official.time_left - time_left; 
    187187 
     
    219219{ 
    220220  static double last_time = -1.0; 
    221221  static int last_movenum = -1; 
    222   struct timer_data* const td 
     222  struct timer_data *const td 
    223223    = (color == BLACK) ? &black_time_data : &white_time_data; 
    224224  double now = gg_gettimeofday(); 
    225225 
     
    282282analyze_time_data(int color, double *time_for_last_move, double *time_left, 
    283283                  int *stones_left) 
    284284{ 
    285   struct remaining_time_data * const timer 
     285  struct remaining_time_data *const timer 
    286286    = (color == BLACK) ? &black_time_data.estimated 
    287287                       : &white_time_data.estimated; 
    288288