Ticket #77: arend_7_9.6.diff

File arend_7_9.6.diff, 3.1 KB (added by arend, 6 years ago)
  • engine/combination.c

    RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/combination.c,v
    retrieving revision 1.56
    diff -u -p -r1.56 combination.c
    atari_atari_blunder_size(int color, int  
    408408  memset(forbidden, 0, sizeof(forbidden)); 
    409409  memset(defense_points, 0, sizeof(defense_points)); 
    410410 
    411   /* FIXME: Maybe these should be moved after the tryko() below? */ 
    412   compute_aa_status(other, safe_stones); 
    413   compute_aa_values(other); 
    414  
    415411  /* Accept illegal ko capture here. */ 
    416412  if (!tryko(move, color, NULL)) 
    417413    /* Really shouldn't happen. */ 
    418414    abortgo(__FILE__, __LINE__, "trymove", move); 
     415 
     416  compute_aa_status(other, safe_stones); 
     417  compute_aa_values(other); 
     418 
    419419  increase_depth_values(); 
    420420 
    421421  aa_val = do_atari_atari(other, &apos, &defense_point, defense_points, 
  • engine/move_reasons.c

    RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/move_reasons.c,v
    retrieving revision 1.133
    diff -u -p -r1.133 move_reasons.c
    mark_safe_stones(int color, int move_pos 
    16371637    else 
    16381638      safe_stones[pos] = 0; 
    16391639  } 
    1640   safe_stones[move_pos] = move[move_pos].move_safety; 
     1640  safe_stones[move_pos] 
     1641    = move[move_pos].move_safety && safe_move(move_pos, color) == WIN; 
    16411642} 
    16421643 
    16431644 
  • engine/owl.c

    RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/owl.c,v
    retrieving revision 1.243
    diff -u -p -r1.243 owl.c
    owl_substantial(int str) 
    59575957  int result; 
    59585958  double start = 0.0; 
    59595959  struct local_owl_data *owl; 
     5960  int num_moves = 0; 
    59605961 
    59615962  if (debug & DEBUG_OWL_PERFORMANCE) 
    59625963    start = gg_cputime(); 
    owl_substantial(int str) 
    59685969 
    59695970  owl->color = OTHER_COLOR(board[str]); 
    59705971  local_owl_node_counter = 0; 
    5971   gg_assert(stackp == 0); 
    59725972 
    59735973  /* Big strings are always substantial since the biggest nakade is 
    59745974   * six stones. (There are probably rare exceptions to this 
    owl_substantial(int str) 
    60086008      if (get_level() >= 8) 
    60096009        increase_depth_values(); 
    60106010      owl->goal[libs[k]] = 1; 
     6011      num_moves++; 
    60116012    } 
    60126013    else { 
    60136014      /* if we can't fill, try swapping with the next liberty */ 
    owl_substantial(int str) 
    60176018          increase_depth_values(); 
    60186019        owl->goal[libs[k+1]] = 1; 
    60196020        libs[k+1] = libs[k]; 
     6021        num_moves++; 
    60206022      } 
    60216023      else { 
    60226024        /* Can't fill the liberties. Give up! */ 
    6023         while (stackp > 0) { 
     6025        while (num_moves-- > 0) { 
    60246026          if (get_level() >= 8) 
    60256027            decrease_depth_values(); 
    60266028          popgo(); 
    owl_substantial(int str) 
    60416043    result = 0; 
    60426044  else 
    60436045    result = 1; 
    6044   while (stackp > 0) { 
     6046  while (num_moves-- > 0) { 
    60456047    if (get_level() >= 8) 
    60466048      decrease_depth_values(); 
    60476049    popgo();