--- /Big/GO/TGZ/gnugo-3.7.8-ref/./engine/clock.c	2006-01-27 16:49:22.000000000 +0100
+++ ./engine/clock.c	2006-02-23 14:25:58.000000000 +0100
@@ -38,6 +38,7 @@
 #include "clock.h"
 #include "gg_utils.h"
 #include "board.h"
+#include <math.h>
 
 /* Level data */
 static int level             = DEFAULT_LEVEL; /* current level */
@@ -333,11 +334,19 @@
   double time_for_last_move;
   double time_left;
   int stones_left;
+  int stones_left_save;
 
   if (!analyze_time_data(color, &time_for_last_move, &time_left, &stones_left))
     return;
 
+  /* Let us be optimistic when we have numerous stones_left to play
+   * ie spend more time in the beginning of the game/byo-yomi, then progressively hurry up */
 
+  stones_left_save=stones_left;
+  if (stones_left_save >= 9)
+  	stones_left=pow(0.899,stones_left); 
+	 /* change nothing for n<9, 15->11, 20->14, 30->21, 60->39, 120->73 */ 
+  
   /* These rules are both crude and ad hoc.
    *
    * FIXME: Use rules with at least some theoretical basis.
@@ -366,6 +375,8 @@
   if (level + level_offset > max_level)
     level_offset = max_level - level;
 
+  stones_left=stones_left_save;
+
   DEBUG(DEBUG_TIME, "New level %d (%d %C %f %f %d)\n", level + level_offset,
 	movenum / 2, color, time_for_last_move, time_left, stones_left);
 }

