gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] arend_1_29.2: more influence tuning


From: Arend Bayer
Subject: [gnugo-devel] arend_1_29.2: more influence tuning
Date: Tue, 26 Mar 2002 21:16:56 +0100 (CET)

 - assymmetry in influence computation reduced
 - case added in strategic_penalty
 - pattern tuning barriers.db and pattern.db
 
This is a pure tuning patch:

The reduced asymmetry comes from a reduction of the maximum value of
intrusions patterns in initial_influence and initial_opposite_influence.
This is to make opponent's moyo seem a little less secure and territory
and therefore make invasions a little more unattractive.

The pattern tuning is some influence pattern fixing that I hadn't done yet
plus some adjustments of shape values. Most notably, 3-3 invasions now
need smaller shape penalty.

The breakage is fine, see below.

The "contact fight" problem is not adressed by this patch.

Arend


3.1.28 + arend_1_29.1 + arend_1_29.2:
(excluding platform dependencies) 17 PASSes, 3 FAILs.
The two neurogo FAILs (pretty identical) are due to an owl failure.

./regress.sh . nngs1.tst
10 unexpected PASS!
16 unexpected PASS!
17 unexpected PASS!
34 unexpected PASS!
./regress.sh . neurogo.tst
8 unexpected FAIL: Correct 'O2', got 'Q5'
28 unexpected FAIL: Correct 'O2', got 'Q5'
./regress.sh . trevorb.tst
180 unexpected PASS!
250 unexpected PASS!
500 unexpected PASS!
830 unexpected PASS!
./regress.sh . manyfaces.tst
1 unexpected PASS!
./regress.sh . nngs.tst
120 unexpected PASS!
850 unexpected FAIL: Correct '!Q9|R9', got 'R9'
1060 unexpected PASS!
./regress.sh . trevorc.tst
280 unexpected PASS!
1040 unexpected PASS!
./regress.sh . arend.tst
38 unexpected PASS!
./regress.sh . 13x13.tst
12 unexpected PASS!
17 unexpected PASS!
(27 unexpected PASS!)
48 unexpected PASS!
./regress.sh . strategy4.tst
?? (not finished yet)



Index: engine/influence.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/influence.c,v
retrieving revision 1.44
diff -u -r1.44 influence.c
--- engine/influence.c  25 Mar 2002 15:25:27 -0000      1.44
+++ engine/influence.c  26 Mar 2002 20:01:01 -0000
@@ -523,7 +523,8 @@
 /* Experimental influence: This function goes through the list of 
  * intrusion sources, and adds the intrusion as influence sources for color. 
  * The strength is corrected so that each stone's intrusions sources
- * can have total strength of at most the strength of the stone.
+ * can have total strength of at most 60%/100% of the strength of the stone.
+ * (100% is if q=&followup_influence, 60% otherwise).
  */
 static void
 add_marked_intrusions(struct influence_data *q, int color)
@@ -534,6 +535,7 @@
   float strength_sum;
   float correction;
   float source_strength;
+  float allowed_strength;
   gg_sort(q->intrusions, q->intrusion_counter, sizeof(q->intrusions[0]),
           compare_intrusions);
 
@@ -567,8 +569,12 @@
           || q->intrusions[j].strength_pos != q->intrusions[j-1].strength_pos)
         strength_sum += q->intrusions[j].strength;
     }
-    if (strength_sum > source_strength)
-      correction = (source_strength / strength_sum);
+    if (q == &followup_influence)
+      allowed_strength = source_strength;
+    else
+      allowed_strength = 0.6 * source_strength;
+    if (strength_sum > allowed_strength)
+      correction = (allowed_strength / strength_sum);
     else
       correction = 1.0;
 
@@ -1758,8 +1764,8 @@
     }
     else
       value_territory(&move_influence);
-    if (m == (board_size - 19) + debug_influence_i
-         && n == debug_influence_j && m >= 0) {
+    if (m == debug_influence_i
+       && n == debug_influence_j && m >= 0) {
       if (printmoyo & PRINTMOYO_VALUE_TERRITORY)
         print_influence_territory(&move_influence,
                                  "territory (after move):\n");
Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.21
diff -u -r1.21 value_moves.c
--- engine/value_moves.c        25 Mar 2002 21:23:47 -0000      1.21
+++ engine/value_moves.c        26 Mar 2002 20:01:17 -0000
@@ -1046,6 +1046,7 @@
   return adjusted_value;
 }
 
+
 /* The new (3.2) territorial evaluation overvalues moves creating a new
  * group in the opponent's sphere of influence. The influence module cannot
  * see that the opponent will gain by attacking the new (probably weak)
@@ -1081,6 +1082,17 @@
     case EXPAND_MOYO_MOVE:
     case STRATEGIC_ATTACK_MOVE:
       continue;
+    /* If we find a tactical defense move, we just test whether it concerns
+     * a single-stone-dragon; if not, we stop, if yes, we let the necessary
+     * tests be made in the OWL_DEFEND_MOVE case.
+     */
+    case DEFEND_MOVE:
+      {
+       int target = worms[move_reasons[r].what];
+       if (dragon[target].size > 1)
+         return 0.0;
+       continue;
+      }
     /* An owl defense of a single stone might be a stupid attempt to run
      * away with an unimportant (kikashi like) stone. We assume this is the
      * case if this single stone has a strong hostile direct neighbor.
@@ -1140,6 +1152,7 @@
   ret_val = gg_max(0.0, ret_val);
   return ret_val;
 }
+
 
 /*
  * Estimate the direct territorial value of a move at (pos).
Index: patterns/barriers.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/barriers.db,v
retrieving revision 1.28
diff -u -r1.28 barriers.db
--- patterns/barriers.db        4 Mar 2002 06:49:08 -0000       1.28
+++ patterns/barriers.db        26 Mar 2002 20:01:20 -0000
@@ -869,6 +869,15 @@
 :/,D
 
 
+Pattern Barrier62
+
+?xX?
+...O
+.!..
+
+:8,DOX
+
+
 Pattern Intrusion1
 
 xxxx
@@ -1034,6 +1043,12 @@
 
 :8,B,value(30)
 
+?aX
+Xb!
+x..
+
+>return (!xplay_attack(b,a));
+
 
 Pattern Intrusion7a
 
@@ -1232,11 +1247,12 @@
 
 :8,B,value(30)
 
-oQo
-aXO
+oeo
+aXd
 cbX
 
 ;!oplay_attack(a,b,c,a)
+>return (lib(d)>2 && lib(e)>2 && !xplay_attack(a,e));
 
 
 Pattern Intrusion16
@@ -1677,7 +1693,7 @@
 ;safe_omove(a)
 ;&& (o_somewhere(e) || oplay_attack(a,e,e))
 ;&& !oplay_defend_both(a,b,c,b,D)
->return (!xplay_attack(e,f));
+>return (!xplay_attack(a,f) && (o_somewhere(e) || (!xplay_attack(e,f))));
 
 
 Pattern Intrusion45
Index: patterns/fuseki.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/fuseki.db,v
retrieving revision 1.12
diff -u -r1.12 fuseki.db
--- patterns/fuseki.db  20 Mar 2002 15:02:22 -0000      1.12
+++ patterns/fuseki.db  26 Mar 2002 20:01:23 -0000
@@ -207,7 +207,7 @@
 |.....
 +-----
 
-:/,Feb,shape(-6)
+:/,Feb,shape(-2)
 
 
 Pattern F8
Index: patterns/patterns.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.db,v
retrieving revision 1.60
diff -u -r1.60 patterns.db
--- patterns/patterns.db        25 Mar 2002 21:23:47 -0000      1.60
+++ patterns/patterns.db        26 Mar 2002 20:01:40 -0000
@@ -8868,13 +8868,14 @@
 Pattern CB327
 # gf Reduced shape value. (3.1.23)
 # See nngs:1750
+# ab increased shape value (3.1.29)
 
 ?.?         seal opponent in
 ...      
 .*O
 OX?
 
-:8,OXcbeEd,shape(2)
+:8,OXcbeEd,shape(3)
 
 
 Pattern CB328
@@ -10520,6 +10521,7 @@
 
 Pattern ED90
 # db New pattern (3.1.28)
+# ab d classification added (3.1.29)
 
 ???..o?          Jump under on the third line
 ???X.oo
@@ -10528,7 +10531,7 @@
 o......
 -------
 
-:8,j
+:8,jd
 
 ???..o?
 ???X.oo




reply via email to

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