Ticket #29: arend_7_8.10-owl_attack_node_count.diff
| File arend_7_8.10-owl_attack_node_count.diff, 3.7 KB (added by arend, 4 years ago) |
|---|
-
engine/dragon.c
RCS file: /cvsroot/gnugo/gnugo/engine/dragon.c,v retrieving revision 1.156 diff -u -p -r1.156 dragon.c
222 222 int acode = 0; 223 223 int dcode = 0; 224 224 int kworm = NO_MOVE; 225 int owl_nodes_before = get_owl_node_counter(); 225 226 start_timer(3); 226 227 acode = owl_attack(str, &attack_point, 227 228 &DRAGON2(str).owl_attack_certain, &kworm); 229 DRAGON2(str).owl_attack_node_count 230 = get_owl_node_counter() - owl_nodes_before; 228 231 if (acode != 0) { 229 232 DRAGON2(str).owl_attack_point = attack_point; 230 233 DRAGON2(str).owl_attack_code = acode; -
engine/liberty.h
RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v retrieving revision 1.248 diff -u -p -r1.248 liberty.h
899 899 int owl_attack_point; /* vital point for attack */ 900 900 int owl_attack_code; /* ko result code */ 901 901 int owl_attack_certain; /* 0 if owl reading node limit is reached */ 902 int owl_attack_node_count; 902 903 int owl_second_attack_point;/* if attacker gets both attack points, wins */ 903 904 int owl_defense_point; /* vital point for defense */ 904 905 int owl_defense_code; /* ko result code */ -
engine/value_moves.c
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v retrieving revision 1.159 diff -u -p -r1.159 value_moves.c
420 420 else 421 421 owl_node_limit *= 0.15; 422 422 423 if (verbose > 0) 424 verbose--; 423 if (DRAGON2(target).owl_attack_node_count < owl_node_limit) { 424 if (verbose > 0) 425 verbose--; 425 426 426 owl_nodes_before = get_owl_node_counter(); 427 acode = owl_does_attack(pos, target, &kworm); 428 owl_nodes_used = get_owl_node_counter() - owl_nodes_before; 429 430 if (acode >= DRAGON2(target).owl_attack_code 431 && acode == WIN) { 432 add_owl_attack_move(pos, target, kworm, acode); 433 DEBUG(DEBUG_LARGE_SCALE | DEBUG_MOVE_REASONS, 434 "Move at %1m owl-attacks %1m on a large scale(%s).\n", 435 pos, target, result_to_string(acode)); 427 owl_nodes_before = get_owl_node_counter(); 428 acode = owl_does_attack(pos, target, &kworm); 429 owl_nodes_used = get_owl_node_counter() - owl_nodes_before; 430 431 if (acode >= DRAGON2(target).owl_attack_code 432 && acode == WIN) { 433 add_owl_attack_move(pos, target, kworm, acode); 434 DEBUG(DEBUG_LARGE_SCALE | DEBUG_MOVE_REASONS, 435 "Move at %1m owl-attacks %1m on a large scale(%s).\n", 436 pos, target, result_to_string(acode)); 437 } 438 else 439 DEBUG(DEBUG_LARGE_SCALE, 440 "Move at %1m isn't a clean large scale attack on %1m (%s).\n", 441 pos, target, result_to_string(acode)); 442 443 DEBUG(DEBUG_LARGE_SCALE, " owl nodes used = %d, dist = %d\n", 444 owl_nodes_used, dist); 445 /* Restore settings. */ 446 verbose = save_verbose; 436 447 } 437 else438 DEBUG(DEBUG_LARGE_SCALE,439 "Move at %1m isn't a clean large scale attack on %1m (%s).\n",440 pos, target, result_to_string(acode));441 442 DEBUG(DEBUG_LARGE_SCALE, " owl nodes used = %d, dist = %d\n",443 owl_nodes_used, dist);444 /* Restore settings. */445 verbose = save_verbose;446 448 decrease_depth_values(); 447 449 owl_node_limit = save_owl_node_limit; 448 450 }
