--- interface/play_gtp.c	19 Oct 2005 09:55:05 -0000	1.174
+++ interface/play_gtp.c	21 Oct 2005 13:46:18 -0000
@@ -455,8 +455,7 @@ gtp_set_boardsize(char *s)
   if (stones_on_board(BLACK | WHITE) > 0)
     update_random_seed();
 
-  board_size = boardsize;
-  clear_board();
+  gnugo_clear_board(boardsize);
   gtp_internal_set_boardsize(boardsize);
   reset_engine();
   return gtp_success("");
@@ -497,8 +496,7 @@ gtp_clear_board(char *s)
   if (stones_on_board(BLACK | WHITE) > 0)
     update_random_seed();
 
-  clear_board();
-  init_timers();
+  gnugo_clear_board(board_size);
   
   return gtp_success("");
 }
--- engine/value_moves.c	21 Oct 2005 11:04:38 -0000	1.159
+++ engine/value_moves.c	21 Oct 2005 13:46:18 -0000
@@ -384,6 +384,75 @@ do_find_more_owl_attack_and_defense_move
   verbose = save_verbose;
 }
 
+static int small_successes[11];
+static int small_failures[11];
+static int big_successes[11];
+static int big_failures[11];
+static int small_successes_node_count[11];
+static int small_failures_node_count[11];
+static int big_successes_node_count[11];
+static int big_failures_node_count[11];
+
+void
+clear_large_scale_statistics(void)
+{
+  int i;
+  for (i = 0; i < 11; i++) {
+    small_successes[i] = 0;
+    small_failures[i] = 0;
+    big_successes[i] = 0;
+    big_failures[i] = 0;
+    small_successes_node_count[i] = 0;
+    small_failures_node_count[i] = 0;
+    big_successes_node_count[i] = 0;
+    big_failures_node_count[i] = 0;
+  }
+  fprintf(stderr, "Cleared large scale statistics.\n");
+}
+
+static void
+report_large_scale_statistic(int data[11])
+{
+  int i, sum;
+  for (i = 0; i < 11; i++)
+    fprintf(stderr, "%6d ", data[i]);
+  fprintf(stderr, "\nCumulated: ");
+  sum = 0;
+  for (i = 0; i < 11; i++) {
+    sum += data[i];
+    fprintf(stderr, "%6d ", sum);
+  }
+}
+
+void
+report_large_scale_statistics(void)
+{
+  int i;
+  fprintf(stderr, "============================ Large scale statistics =============\nStatistics for close attacks (node limit = 350):\nnode count:");
+  for (i = 0; i < 11; i++)
+    fprintf(stderr, "<=%4d ", i*100);
+  fprintf(stderr, "\nSuccesses: ");
+  report_large_scale_statistic(big_successes);
+  fprintf(stderr, "\nNodes:     ");
+  report_large_scale_statistic(big_successes_node_count);
+  fprintf(stderr, "\nFailures:  ");
+  report_large_scale_statistic(big_failures);
+  fprintf(stderr, "\nNodes:     ");
+  report_large_scale_statistic(big_failures_node_count);
+
+  fprintf(stderr, "\n\nStatistics for wide attacks (node limit = 150):\nnode count:");
+  for (i = 0; i < 11; i++)
+    fprintf(stderr, "<=%4d ", i*100);
+  fprintf(stderr, "\nSuccesses: ");
+  report_large_scale_statistic(small_successes);
+  fprintf(stderr, "\nNodes:     ");
+  report_large_scale_statistic(small_successes_node_count);
+  fprintf(stderr, "\nFailures:  ");
+  report_large_scale_statistic(small_failures);
+  fprintf(stderr, "\nNodes:     ");
+  report_large_scale_statistic(small_failures_node_count);
+  fprintf(stderr, "\n============================ Large scale statistics =============\n");
+}
 
 
 /* Try whether the move at (pos) for (color) is also an owl attack on
@@ -400,6 +469,7 @@ try_large_scale_owl_attack(int pos, int 
   int acode;
   int save_verbose = verbose;
   int save_owl_node_limit = owl_node_limit;
+  int index = gg_min((DRAGON2(target).owl_attack_node_count * 10 ) / owl_node_limit, 10);
   
   ASSERT1(board[target] == OTHER_COLOR(color), pos);
   ASSERT1(!owl_attack_move_reason_known(pos, target), pos);
@@ -430,14 +500,31 @@ try_large_scale_owl_attack(int pos, int 
   if (acode >= DRAGON2(target).owl_attack_code
       && acode == WIN) {
     add_owl_attack_move(pos, target, kworm, acode);
+    if (dist <=1 ) {
+      big_successes[index] += 1;
+      big_successes_node_count[index] += owl_nodes_used;
+    }
+    else {
+      small_successes[index] += 1;
+      small_successes_node_count[index] += owl_nodes_used;
+    }
     DEBUG(DEBUG_LARGE_SCALE | DEBUG_MOVE_REASONS,
 	  "Move at %1m owl-attacks %1m on a large scale(%s).\n", 
 	  pos, target, result_to_string(acode));
   }
-  else
+  else {
+    if (dist <=1 ) {
+      big_failures[index] += 1;
+      big_failures_node_count[index] += owl_nodes_used;
+    }
+    else {
+      small_failures[index] += 1;
+      small_failures_node_count[index] += owl_nodes_used;
+    }
     DEBUG(DEBUG_LARGE_SCALE,
 	  "Move at %1m isn't a clean large scale attack on %1m (%s).\n",
 	  pos, target, result_to_string(acode));
+  }
   
   DEBUG(DEBUG_LARGE_SCALE, "  owl nodes used = %d, dist = %d\n", 
 	owl_nodes_used, dist);
only in patch2:
unchanged:
--- engine/liberty.h	19 Oct 2005 09:55:04 -0000	1.248
+++ engine/liberty.h	21 Oct 2005 13:46:18 -0000
@@ -899,6 +899,7 @@ struct dragon_data2 {
   int owl_attack_point;    /* vital point for attack                         */
   int owl_attack_code;     /* ko result code                                 */
   int owl_attack_certain;  /* 0 if owl reading node limit is reached         */
+  int owl_attack_node_count;
   int owl_second_attack_point;/* if attacker gets both attack points, wins   */
   int owl_defense_point;   /* vital point for defense                        */
   int owl_defense_code;    /* ko result code                                 */
--- engine/interface.c	19 Oct 2005 09:55:04 -0000	1.59
+++ engine/interface.c	21 Oct 2005 13:46:18 -0000
@@ -54,6 +54,8 @@ init_gnugo(float memory, unsigned int se
 
   clear_approxlib_cache();
   clear_accuratelib_cache();
+
+  clear_large_scale_statistics();
 }
 
 
@@ -68,6 +70,7 @@ gnugo_clear_board(int boardsize)
   board_size = boardsize;
   clear_board();
   init_timers();
+  report_large_scale_statistics();
 #if 0
   if (metamachine && oracle_exists)
     oracle_clear_board(boardsize);
--- engine/dragon.c	19 Oct 2005 09:55:04 -0000	1.156
+++ engine/dragon.c	21 Oct 2005 13:46:18 -0000
@@ -222,9 +222,12 @@ make_dragons(int stop_before_owl)
 	int acode = 0;
 	int dcode = 0;
 	int kworm = NO_MOVE;
+	int owl_nodes_before = get_owl_node_counter();
 	start_timer(3);
 	acode = owl_attack(str, &attack_point, 
 			   &DRAGON2(str).owl_attack_certain, &kworm);
+	DRAGON2(str).owl_attack_node_count
+	  = get_owl_node_counter() - owl_nodes_before;
 	if (acode != 0) {
 	  DRAGON2(str).owl_attack_point = attack_point;
 	  DRAGON2(str).owl_attack_code = acode;
