gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] RE: Reward multi-purpose moves ?


From: Portela Fernand
Subject: [gnugo-devel] RE: Reward multi-purpose moves ?
Date: Fri, 8 Nov 2002 16:50:44 +0100

Sorry, the mail went mysteriously out before I can include the patch.
Here it is.

/nando

Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.65
diff -u -r1.65 value_moves.c
--- engine/value_moves.c        20 Oct 2002 10:40:45 -0000      1.65
+++ engine/value_moves.c        8 Nov 2002 15:33:01 -0000
@@ -2509,6 +2509,22 @@
       }
       tot_value += base_value * shape_factor2;
     }
+
+    if (1) { /* multipurpose move bonus */
+      int num_reasons = 0;
+      while (move[pos].reason[num_reasons] >= 0)
+       num_reasons++;
+      if (num_reasons > 2) {
+       float factor, bonus;
+       factor = pow(1.003, (float) num_reasons) - 1.0;
+       bonus = tot_value * factor;
+       if (verbose) {
+         TRACE("  %1m: %f - multipurpose move bonus (%d reasons)\n",
+               pos, bonus, num_reasons);
+       }
+       tot_value += bonus;
+      }
+    }
   }
   else {
     move[pos].additional_ko_value =




reply via email to

[Prev in Thread] Current Thread [Next in Thread]