gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] arend_1_25.3: less (??) experimental influence


From: Arend Bayer
Subject: [gnugo-devel] arend_1_25.3: less (??) experimental influence
Date: Mon, 11 Feb 2002 23:32:25 +0100 (CET)

 - experimental influence: yet another new_value_territory revision
 - experimental influence: fixed followup values really taken down (shapes.c)
 - experimental influence: pattern tuning
 
new_value_territory now combines the two approaches I tried for devaluing
center territory. There is a reduced direct center correction, and
an erosion step; however, permeability now gets to control the erosion,
which means I do not have to shift any barriers. This center correction
might still be suspect to some fine tuning.

With my last patch, I had forgotten to add the check for Y-patterns
(i.e. those depending on experimental_influence setting) in shapes.c. So
the retirement of almost all fixed followup values in experimental
influence is only effective now.
 



After this patch, --experimental-influence produces 58 PASSes and 53 FAILs.
which is quite dubious, of course. However, my personal impression was
that the current state should already be an improvement in playing strength
compared to standard influence.

There are numerous regression cases where GNU Go's assessment of the
position was wrong, but it happened to play the right move. As the change
of the territory valuation does changes every single valuation, this can
both cause previous accidental passes to turn into a FAIL and vice versa,
which makes the regression results a quite unreliable benchmark for the
territory valuation.

So I decided to go through the tedious exercise of systematically looking at
all the PASSes and FAILs. Below is a list with short comments.

My conclusion is as follows: I still think that there is a substantial gain
-- if there would not remain one big problem. This is the overvaluation of
invasion moves. This turns up in a number of tests in trevorb in 13x13-games.
  (Here, the influence module values the approach move to hoshi's with
  20-25 pts, which is not too unreasonable. However, from various patterns
  it gets a strategic attack bonus of ~10pts, making GNU Go tenuki from
  joseki. The strategic bonus is inappropriate as the approach move is
  weak itself.)
However, there are two or three cases where this turns up on a 19x19-board
as well, producing some strange moves there (see nngs:900 for an
outstanding example). I am a bit reluctant to change this via influence
tuning, as the territory valuation is not far off in most cases; I fear
that artificial changes to work around this may loose precision in
other cases.

Instead I would like to assign a negative strategical value of maybe
5-10 pts for moves that
1. are played in the opponent's sphere of influence
2. are not connected to a friendly living dragon
3. have weak escape value.

A good handling of this problem would also be a precondition to a special
moyo-reduction move generator.

I am not quite sure how to implement this, as value_moves does not seem
to know about the second condition. Maybe I will just drop it and rely
only on the escape value for this part. Probably I should not yet use
connection readers for this? Any other idea?

Once this is done, I think we could start playing 2gtp-matches of standard
vs experimental influence to see whether my general impression is right.
Certainly there will still be room for improved influence tuning, but
I would not expect any substantial changes anymore. So this should not be
an obstacle to making --experimental-influence default.

Arend


./regress.sh . ld_owl.tst
301 unexpected FAIL: Correct '3 B18', got '0'   platform dependency
./regress.sh . trevora.tst
140 unexpected PASS!                            luck
430 unexpected PASS!                            urgent (cvs PASSes as well)
450 unexpected PASS!                            good 
530 unexpected PASS!                            luck
./regress.sh . strategy.tst
20 unexpected PASS!                             good
22 unexpected FAIL: Correct 'K3', got 'J11'     (not very) bad;
        however, this is unreproduable for me (persistent cache effect?)
./regress.sh . neurogo.tst
8 unexpected FAIL: Correct 'O2', got 'Q5'       owl fault
28 unexpected FAIL: Correct 'O2', got 'Q5'      owl fault
        both are an owl problem, M3 is assumed to be alive
        (otherwise O2 would get a followup bonus from saving M3)
./regress.sh . rosebud.tst
1 unexpected FAIL: Correct 'E16', got 'E18'     ?
        GNU Go thinks E18 kills the corner; strange it preferred E16 before
./regress.sh . golife.tst
4 unexpected PASS!                              not urgent
./regress.sh . viking.tst
3 unexpected FAIL: Correct 'M15|B7', got 'Q3'   bad
        difficult to solve (Q3 saves Q4 but Q4 cannot be killed cleanly,
        so Q3 is not so urgent)
7 unexpected PASS!                              good
        local problem not solved (connection problem), but moyo reduction
        at P12 preferred
9 unexpected PASS!                              good!
./regress.sh . lazarus.tst
4 unexpected FAIL: Correct 'R12|Q12|M8', got 'T5' bad (bit lucky before)
16 unexpected PASS!                             luck
./regress.sh . trevorb.tst
180 unexpected FAIL: Correct 'L12', got 'H3'    bad
250 unexpected FAIL: Correct 'C2', got 'L8'     bad
370 unexpected FAIL: Correct 'L7|B10', got 'D7' bad
440 unexpected FAIL: Correct 'E6', got 'J6'     bad
        See discussion above.
450 unexpected PASS!                            luck
500 unexpected FAIL: Correct '!J11', got 'J11'  bad, but hardly related
520 unexpected PASS!                            good
600 unexpected PASS!                            good
        (F2 get followup, G1 does not)
620 unexpected PASS!                            good (cvs PASSes as well)
660 unexpected FAIL: Correct 'D3', got 'H5'     (not very) bad
        GNU Go cannot judge territory correctly that is open at 2 sides
700 unexpected PASS!                            very small gain
790 unexpected FAIL: Correct 'K6|K5', got 'A6'  bad luck
        reverse followup at A6 too large
840 unexpected PASS!                            luck
960 unexpected PASS!                            luck
./regress.sh . strategy2.tst
51 unexpected FAIL: Correct 'P3', got 'N5'      bad
        before, it passed only due to minimum move value of P3. N5 gets
        a little to high terr. valuation (~23) + strange shape bonus and a
        little to high strategic bonus
53 unexpected PASS!                             good (cvs PASSes as well)
85 unexpected FAIL: Correct 'O2', got 'N5'      very bad
        This does show a problem of the territory valuation, N5 is
        overvalued. However, a strategic minus for creating a heavy group
        by running away with a stone in front of opp's group
90 unexpected FAIL: Correct 'B14|D17', got 'H2' bad (?)
91 unexpected FAIL: Correct 'B14|G13', got 'H2' bad (?)
        Both are unreproducible from command line.
./regress.sh . nicklas3.tst
602 unexpected PASS!                            good
./regress.sh . nicklas5.tst
1202 unexpected PASS!                           luck
./regress.sh . manyfaces.tst
1 unexpected FAIL: Correct 'S13', got 'N15'     good
        This is the kind of move GNU Go was supposed to learn!
7 unexpected FAIL: Correct 'R2|S7', got 'E3'    bad
./regress.sh . niki.tst
4 unexpected FAIL: Correct 'Q8', got 'R13'      bad
        but mainly due to various strategic effects of R13
./regress.sh . trevor.tst
190 unexpected FAIL: Correct 'B7', got 'F5'     very bad
./regress.sh . buzco.tst
8 unexpected PASS!                              good-
./regress.sh . nngs.tst
230 unexpected PASS!                            good
310 unexpected PASS!                            good!
420 unexpected FAIL: Correct '!C4|D3|C3|B3', got 'C4' bad luck
490 unexpected PASS!                            luck
640 unexpected PASS!                            good! (move at D6 found)
700 unexpected FAIL: Correct 'K17', got 'K18'   ok
800 unexpected FAIL: Correct '!N19|M19|L19|S18|K1', got 'K1'
        This is not reproducible. Also, it was luck it passed before.
        A lot of valuations look strange here.
850 unexpected PASS!                            good!
900 unexpected FAIL: Correct 'Q15', got 'Q7'    very bad
1020 unexpected PASS!                           good
1050 unexpected PASS!                           good
1080 unexpected FAIL: Correct 'K17', got 'F3'   good
        bad problem
1250 unexpected PASS!                           good-
1270 unexpected FAIL: Correct 'C16|B15', got 'C15' bad luck
1760 unexpected PASS!                           good-
1790 unexpected PASS!                           oops?
1800 unexpected PASS!                           no improvement (Q14)
1920 unexpected FAIL: Correct '!L11', got 'L11' bad luck
        (why does an unsafe move get strategic cut values?)
1940 unexpected PASS!                           good (some luck)
1955 unexpected FAIL: Correct 'D3', got 'J3'    bad
./regress.sh . trevorc.tst
160 unexpected FAIL: Correct 'K7', got 'J8'     bad, strange strategic effects
170 unexpected PASS!                            luck, strange strategic effects
280 unexpected PASS!                            platform dependency
330 unexpected PASS!                            good 
410 unexpected PASS!                            luck
530 unexpected FAIL: Correct 'J3', got 'K4'     bad
        should be solvable with pattern tuning
600 unexpected PASS!                            no improvement (D9)
610 unexpected PASS!                            not reproducible
750 unexpected PASS!                            good-
1080 unexpected FAIL: Correct '!L8|K10|K9', got 'L8'
        I don't understand the point of this problem. Will W L8 really die?
        Is M10 really better?
1240 unexpected PASS!                           some luck, strange position
1290 unexpected PASS!                           good
1310 unexpected PASS!                           good
1340 unexpected PASS!                           good-
1350 unexpected PASS!                           good!
1370 unexpected FAIL: Correct 'B9', got 'C9'    nothing wrong with C9
1400 unexpected PASS!                           good, some luck
1570 unexpected FAIL: Correct 'E2|F2|F3', got 'E1' oops!
        funny shape! easy to correct with a replace pattern
1640 unexpected PASS!                           good
./regress.sh . connect.tst
37 unexpected PASS!                             huh?
./regress.sh . global.tst
5 unexpected FAIL: Correct 'O4', got 'S12'      bad, but also strategy fault
        rrgs. However, I think he reason why O4 is preferable is the
        cutting value N3/P3 and the cut potential at N5. Both are not
        implemented/undervalued at the moment.
16 unexpected FAIL: Correct 'O10', got 'P12'    bad luck
        cvs has same problem
28 unexpected PASS!                             good
./regress.sh . arend.tst
14 unexpected FAIL: Correct 'P17', got 'G13'    bad
        G13 gets some overvalued strategic effects.
23 unexpected FAIL: Correct '!H10', got 'H10'   bad
        Genuine territory valuation problem.
24 unexpected FAIL: Correct '!P16', got 'P16'   minor problem
30 unexpected PASS!                             good
        but I am not really sure what caused this pass
32 unexpected FAIL: Correct 'F9|E8', got 'G8'   ok
        problem wrong
33 unexpected FAIL: Correct 'F9', got 'M5'      bad luck
        completely lucky it passed before, the connection problem
        remains to be solved.
./regress.sh . 13x13.tst
17 unexpected FAIL: Correct 'L5|L3', got 'G8'   bad (some bad luck)
        L5/L3 (combination attack) should get awarded some strategic
        bonus
33 unexpected PASS!                             luck
38 unexpected FAIL: Correct 'G11', got 'E3'     very bad
41 unexpected FAIL: Correct '!C8', got 'C8'     bad luck
43 unexpected FAIL: Correct 'D6', got 'B6'      ok
        B6 is not necessarily worse (GNU Go does realize it leaves a
        gap in the center)
76 unexpected FAIL: Correct 'K6|L6|J3', got 'J5'  ok
        J5 fits quite well here I'd say, shows GNU Go trying to build moyo.
85 unexpected FAIL: Correct 'D2', got 'B10'     looks ok
88 unexpected PASS!                             some luck
./regress.sh . trevord.tst
180 unexpected FAIL: Correct 'S9', got 'O5'     bad
        should be fixable with pattern tuning
240 unexpected PASS!                            good!
        moyo reduction at L8; position of L8 could be improved, though.
550 unexpected FAIL: Correct 'T8', got 'J8'     ok
        I think this is ok. F8 is a weak group, and Black is threatening
        a moyo while attacking it.
590 unexpected FAIL: Correct '!N14', got 'N14'  bad luck
710 unexpected PASS!                            good
830 unexpected PASS!                            good
./regress.sh . strategy4.tst
190 unexpected PASS!                            good
194 unexpected FAIL: Correct 'A13', got 'D6'    bad, some bad luck
        hmm, GNU Go thinks D6 captures D8; this is not mentionend
        on Trevor's trace file -- another platform dependency?
200 unexpected PASS!                            luck
204 unexpected FAIL: Correct 'B2', got 'G6'     (not very) bad
207 unexpected PASS!                            good
209 unexpected PASS!                            not reproducible

Index: engine/influence.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/influence.c,v
retrieving revision 1.34
diff -u -r1.34 influence.c
--- engine/influence.c  6 Feb 2002 18:43:05 -0000       1.34
+++ engine/influence.c  11 Feb 2002 21:28:07 -0000
@@ -170,7 +170,7 @@
     attenuation = q->white_attenuation[m][n];
   else
     attenuation = q->black_attenuation[m][n];
-  if (experimental_influence && ! (q == &escape_influence))
+  if (experimental_influence)
     diagonal_attenuation = attenuation * EXP_DIAGONAL_DAMPING;
   else
     diagonal_attenuation = attenuation * DIAGONAL_DAMPING;
@@ -365,14 +365,14 @@
   
   if (q != &escape_influence) {
     q->color_to_move = color;
-    if (experimental_influence && ! (q == &escape_influence))
+    if (experimental_influence)
       attenuation = EXP_DEFAULT_ATTENUATION;
     else
       attenuation = DEFAULT_ATTENUATION;
   }
   else {
     q->color_to_move = EMPTY;
-    if (experimental_influence && ! (q == &escape_influence))
+    if (experimental_influence)
       attenuation = 2 * EXP_DEFAULT_ATTENUATION;
     else
       attenuation = 2 * DEFAULT_ATTENUATION;
@@ -548,6 +548,9 @@
       add_influence_source(q->intrusions[i].strength_pos, color,
                            q->intrusions[j].strength,
                            q->intrusions[j].attenuation, q);
+      DEBUG(DEBUG_INFLUENCE, "Adding %s intrusion at %1m, value %f\n",
+           (color == BLACK) ? "black" : "white",
+           q->intrusions[j].strength_pos, q->intrusions[j].strength);
       j = i+1;
       continue;
     }
@@ -619,13 +622,14 @@
    */
   if (pattern->class & CLASS_Y) 
     if (((pattern->class & CLASS_F)
-         && (experimental_influence && !(q == &escape_influence)))
+         && experimental_influence)
         || (!(pattern->class & CLASS_F) 
-         && !(experimental_influence && !(q == &escape_influence))))
+            && !experimental_influence))
     return;
+
   /* We currently ignore enhancement patterns in experimental influence. */
   if ((pattern->class & CLASS_E)
-      && (experimental_influence && !(q == &escape_influence)))
+      && experimental_influence)
     return;
 
   /* Loop through pattern elements to see if an A or D pattern
@@ -636,7 +640,8 @@
     for (k = 0; k < pattern->patlen; ++k) { /* match each point */
       int x, y;
       int blocking_color;
-      if (pattern->patn[k].att != ATT_comma)
+      if (pattern->patn[k].att != ATT_comma
+         && (!experimental_influence || pattern->patn[k].att != ATT_not))
        break;  /* All commas are guaranteed to come first. */
 
       /* transform pattern real coordinate */
@@ -795,7 +800,8 @@
    */
   for (k = 0; k < pattern->patlen; ++k) { /* match each point */
     if (((pattern->class & (CLASS_D | CLASS_A))
-        && pattern->patn[k].att == ATT_comma)
+        && (pattern->patn[k].att == ATT_comma
+            || (pattern->patn[k].att == ATT_not && experimental_influence)))
        || ((pattern->class & CLASS_B)
            && pattern->patn[k].att == ATT_not)) {
       /* transform pattern real coordinate */
@@ -813,15 +819,25 @@
          blocking_color = OTHER_COLOR(color);
        DEBUG(DEBUG_INFLUENCE, "  barrier for %s influence at %m\n",
              color_to_string(OTHER_COLOR(blocking_color)), x, y);
-       if (blocking_color == WHITE)
-         q->black_permeability[x][y] = 0.0;
-       else
-         q->white_permeability[x][y] = 0.0;
+       if (pattern->patn[k].att == ATT_comma) {
+         if (blocking_color == WHITE)
+           q->black_permeability[x][y] = 0.0;
+         else
+           q->white_permeability[x][y] = 0.0;
+       }
+       /* Weak barrier at !-marked points. */
+       else {
+         if (blocking_color == WHITE)
+           q->black_permeability[x][y] *= 0.7;
+         else
+           q->white_permeability[x][y] *= 0.7;
+         
+       }
       }
       
       /* Low intensity influence source for the color in turn to move. */
       if (pattern->class & CLASS_B) {
-        if (experimental_influence && !(q == &escape_influence))
+        if (experimental_influence)
           enter_intrusion_source(saved_pos, POS(x, y), pattern->value,
                                 EXP_DEFAULT_ATTENUATION, q);
         else
@@ -908,7 +924,7 @@
       /* Low intensity influence source for the color in turn to move. */
       enter_intrusion_source(saved_stone, pos, pattern->value,
                             EXP_DEFAULT_ATTENUATION, &followup_influence);
-      DEBUG(DEBUG_INFLUENCE, "  followup for %1m: intrusion at %m\n",
+      DEBUG(DEBUG_INFLUENCE, "  followup for %1m: intrusion at %1m\n",
             saved_stone, pos);
     }
 }
@@ -940,7 +956,7 @@
   if (color != EMPTY)
     matchpat(influence_callback, color, &barrierspat_db, q, NULL);
 
-  if (experimental_influence && !(q == &escape_influence))
+  if (experimental_influence)
     add_marked_intrusions(q, color);
 
   /* When color == EMPTY, we introduce a weaker kind of barriers
@@ -1188,30 +1204,41 @@
   }
 }
 
-/* Determines how much influence is needed at least to claim an
- * intersection as territory, in dependence of the "center value".
+/* This curve determines how much influence is needed at least to claim
+ * an intersection as territory, in dependence of the "center value".
  * (In the center, more effort is needed to get territory!)
+ * The center value is at the moment defined as follows:
+ * If d1, d2 are the distance to vertical and horizontal border, resp.,
+ * with d1<d2, then
+ * central = 3 * d1 + min(d2, 4)
+ * So this is mainly a function of the distance to the border; the
+ * distance to the second-nearest border gives a small correction of at
+ * most 4. This distinguishes edge and corner positions.
+ *
+ * The values for intersections close to a corner or to the edge have
+ * to be consistent such that standard corner enclosure etc. are
+ * sufficient to claim territory. The center values are more arbitrary
+ * suspect to tuning.
  */
 struct interpolation_data min_infl_for_territory =
-  { 6,  0.0, 24.0, { 10.0, 26.0, 37.0, 46.0, 54.0, 60.0, 65.0 }};
+  { 6,  0.0, 24.0, { 6.0, 15.0, 26.0, 36.0, 45.0, 50.0, 55.0 }};
 
 /* Determines the territory correction factor in dependence of the ratio
  * ( influence of stronger color / min_infl_for_territory(intersection))
  */
 struct interpolation_data territory_correction = 
-  { 5, (float) 0.0, 1.0, {0.0, 0.3, 0.55, 0.75, 0.9, 1.0}};
+  { 5, (float) 0.0, 1.0, {0.0, 0.25, 0.45, 0.65, 0.85, 1.0}};
 
 static void
 new_value_territory(struct influence_data *q)
 {
   int i, j;
   int dist_i, dist_j;
-  float centralness;
+  float central;
   float first_guess[MAX_BOARD][MAX_BOARD];
   float ratio;
-#if 0
+  float neighbor_val;
   int k;
-#endif
 
   /* First loop: guess territory directly from influence. */
   for (i = 0; i < board_size; i++)
@@ -1225,11 +1252,16 @@
           diff = (q->white_influence[i][j] - q->black_influence[i][j])
                 /(q->white_influence[i][j] + q->black_influence[i][j]);
         first_guess[i][j] = diff * diff * diff;
+
         dist_i = gg_min(i, board_size - i -1);
         dist_j = gg_min(j, board_size - j -1);
-       centralness = (float) 2 * gg_min(dist_i, dist_j) + dist_i + dist_j;
+       if (dist_i > dist_j)
+         dist_i = gg_min(4, dist_i);
+       else
+         dist_j = gg_min(4, dist_j);
+       central = (float) 2 * gg_min(dist_i, dist_j) + dist_i + dist_j;
         ratio = gg_max(q->black_influence[i][j], q->white_influence[i][j])
-                / interpolate(&min_infl_for_territory, centralness);
+                / interpolate(&min_infl_for_territory, central);
         first_guess[i][j] *= interpolate(&territory_correction, ratio);
 
        /* Dead stone, upgrade to territory. Notice that this is not
@@ -1246,32 +1278,45 @@
       q->territory_value[i][j] = first_guess[i][j];
     }
 
-#if 0
-  /* Second loop: Correct according to neighbour vertices. */
+  /* Second loop: Correct according to neighbour vertices. Each territory
+   * value is degraded to the minimum value of its neighbors (unless this
+   * neighbor has reduced permeability for the opponent's influence).
+   */
   for (i = 0; i < board_size; i++)
     for (j = 0; j < board_size; j++) {
+      /* Do not overrule dead stone territory above. */
       if (q->p[i][j] == EMPTY) {
+       /* Loop over all neighbors. */
         for (k = 0; k < 4; k++) {
           if (!ON_BOARD2(i+deltai[k],j+deltaj[k]))
             continue;
           if (q->territory_value[i][j] > 0.0) {
             /* White territory. */
-            if (q->p[i+deltai[k]][j+deltaj[k]] != WHITE)
+            if (q->p[i+deltai[k]][j+deltaj[k]] != WHITE) {
+             neighbor_val =
+               q->black_permeability[i+deltai[k]][j+deltaj[k]]
+                 * first_guess[i+deltai[k]][j+deltaj[k]]
+               + (1 - q->black_permeability[i+deltai[k]][j+deltaj[k]])
+                 * first_guess[i][j];
               q->territory_value[i][j]
-                = gg_max(0, gg_min(q->territory_value[i][j],
-                                   first_guess[i+deltai[k]][j+deltaj[k]]));
+                = gg_max(0, gg_min(q->territory_value[i][j], neighbor_val));
+           }
           }
           else {
             /* Black territory. */
-            if (q->p[i+deltai[k]][j+deltaj[k]] != BLACK)
+            if (q->p[i+deltai[k]][j+deltaj[k]] != BLACK) {
+             neighbor_val =
+               q->white_permeability[i+deltai[k]][j+deltaj[k]]
+                 * first_guess[i+deltai[k]][j+deltaj[k]]
+               + (1 - q->white_permeability[i+deltai[k]][j+deltaj[k]])
+                 * first_guess[i][j];
               q->territory_value[i][j]
-                = gg_min(0, gg_max(q->territory_value[i][j],
-                                   first_guess[i+deltai[k]][j+deltaj[k]]));
+                = gg_min(0, gg_max(q->territory_value[i][j], neighbor_val));
+           }
           }
         }
       }
     }
-#endif
 
   /* Third loop: Nonterritory patterns, points for prisoners. */
   for (i = 0; i < board_size; i++)
@@ -1714,9 +1759,14 @@
 {
   int i, j;
   int ii;
+  int save_experimental_influence;
 
+  /* Use traditional influence for escape influence. */
+  save_experimental_influence = experimental_influence;
+  experimental_influence = 0;
   compute_influence(&escape_influence, OTHER_COLOR(color), -1, -1,
                    dragons_known, goal, NULL);
+  
   for (i = 0; i < board_size; i++)
     for (j = 0; j < board_size; j++) {
       ii = POS(i, j);
@@ -1739,6 +1789,7 @@
                            escape_influence.black_influence,
                            "%3.0f", 3, 1);
   }    
+  experimental_influence = save_experimental_influence;
 }
 
 
Index: engine/influence.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/influence.h,v
retrieving revision 1.7
diff -u -r1.7 influence.h
--- engine/influence.h  6 Feb 2002 18:43:05 -0000       1.7
+++ engine/influence.h  11 Feb 2002 21:28:07 -0000
@@ -32,11 +32,11 @@
 
 /* default attenuation coefficient. */
 #define DEFAULT_ATTENUATION 3.0
-#define EXP_DEFAULT_ATTENUATION 2.2
+#define EXP_DEFAULT_ATTENUATION 2.4
 
 /* Extra damping coefficient for spreading influence diagonally. */
 #define DIAGONAL_DAMPING 2.0
-#define EXP_DIAGONAL_DAMPING 1.5
+#define EXP_DIAGONAL_DAMPING 1.7
 
 /* Default strength of the influence from a stone. May be lowered if
  * it is unsafe.
Index: engine/shapes.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/shapes.c,v
retrieving revision 1.24
diff -u -r1.24 shapes.c
--- engine/shapes.c     6 Feb 2002 18:43:05 -0000       1.24
+++ engine/shapes.c     11 Feb 2002 21:28:10 -0000
@@ -70,6 +70,14 @@
 
   /* Make a local copy of the classification that we may modify. */
   int class = pattern->class;
+  
+  /* Y patterns get rejected if F flag does not match with
+   * experimental_influence mode.
+   */
+  if (class & CLASS_Y)
+    if (!((experimental_influence && !(class & CLASS_F))
+         ||(!experimental_influence && (class & CLASS_F))))
+      return;
 
   /* Don't need auxiliary data in this callback. */
   UNUSED(data);
Index: patterns/barriers.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/barriers.db,v
retrieving revision 1.23
diff -u -r1.23 barriers.db
--- patterns/barriers.db        6 Feb 2002 18:43:05 -0000       1.23
+++ patterns/barriers.db        11 Feb 2002 21:28:12 -0000
@@ -818,6 +818,40 @@
 
 ;oplay_attack(a,b,b)
 
+Pattern Barrier60a
+
+.X.
+...
+.!.
+.!.
+---
+
+:|,AX
+
+
+Pattern Barrier60b
+
+.O.
+.,.
+.!.
+.!.
+---
+
+:|,DO
+
+
+Pattern Barrier61
+
+|oooooo
+|!!...o
+|...O.o
+|..X..o
+|....!o
+|....!o
++------
+
+:/,D
+
 
 Pattern Intrusion1
 
@@ -896,13 +930,13 @@
 
 :8,B,value(30)
 
-
 xXx?
-..ab
-!!..
+..bd
+a!c.
 ----
 
->return (!xplay_attack(a,b));
+;!oplay_attack(a,b,c,d)
+>return (!xplay_attack(b,d));
 
 
 Pattern Intrusion3
@@ -921,6 +955,7 @@
 ----
 
 ;!oplay_attack(a,b,c,d)
+>return (!xplay_attack(b,d));
 
 
 Pattern Intrusion4
@@ -941,7 +976,7 @@
 >return (!xplay_attack(a,d));
 
 
-Pattern Intrusion5
+Pattern Intrusion5a
 
 X.OX
 .!X.
@@ -958,6 +993,19 @@
 ;oplay_attack(a,b,C)
 >return (!xplay_attack(b,d));
 
+Pattern Intrusion5b
+
+.OX
+!X.
+
+:8,BY,value(30)
+
+bfE
+aDc
+
+;!oplay_defend_both(a,b,c,D,E)
+>return (!xplay_attack(b,f));
+
 
 Pattern Intrusion6
 
@@ -976,11 +1024,12 @@
 
 :8,BFY,value(30)
 
-OA.
-.!!
+cA.
+b!!
 X.x
 
 ;lib(A)==2
+>return (!xplay_attack(b,c));
 
 
 Pattern Intrusion7b
@@ -988,14 +1037,12 @@
 OX
 !!
 
-
 :8,BY,value(30)
 
-cA
+cC
 ba
 
-
-;oplay_attack_either(a,b,A,b);
+;oplay_attack_either(a,b,C,b);
 >return (!xplay_attack(b,c));
 
 
@@ -1009,10 +1056,11 @@
 :8,B,value(30)
 
 B.X
-Oa!
+ca!
 ?X.
 
 ;oplay_attack(a,B) && !attack(B)
+>return (!xplay_attack(a,c));
 
 
 Pattern Intrusion9
@@ -1069,7 +1117,7 @@
 ;oplay_attack(a,b,b) && oplay_attack(c,d,d)
 
 
-Pattern Intrusion12
+Pattern Intrusion12a
 # O can intrude on either side. The position of the influence source
 # here isn't entirely accurate.
 
@@ -1085,6 +1133,7 @@
 cXa
 ...
 ...
+---
 
 ;oplay_attack(a,b,b) || oplay_attack(c,d,d)
 
@@ -1102,6 +1151,34 @@
 
 ;o_somewhere(b) || oplay_attack_either(a,b,b,C)
 
+Pattern Intrusion12b
+
+oOo
+.X!
+...
+
+:8,OBY,value(30)
+
+odb
+.Ca
+...
+
+;o_somewhere(b) || oplay_attack_either(a,b,b,C)
+>return (!xplay_attack(b,d));
+
+
+# Pattern Intrusion12c
+# 
+# O!
+# X.
+# 
+# :8,OB,value(5)
+#   
+# ab
+# X.
+# 
+# >return (!xplay_attack(b,a));
+# 
 
 Pattern Intrusion13
 
@@ -1226,6 +1303,12 @@
 
 :8,B,value(30)
 
+b.X
+a!.
+x..
+
+>return(!xplay_attack(a,b));
+
 
 Pattern Intrusion21b
 
@@ -1235,6 +1318,11 @@
 
 :8,B,value(30)
 
+ooX
+ba.
+x..
+
+>return(!xplay_attack(a,b));
 
 Pattern Intrusion22
 
@@ -1244,6 +1332,12 @@
 
 :8,B,value(10)
 
+b.X
+a..
+.!.
+  
+>return(!xplay_attack(a,b));
+
 
 Pattern Intrusion23
 
@@ -1464,10 +1558,11 @@
 :8,B,value(30)
 
 ?X
-Oa
+ba
 oX
 
 ;safe_omove(a)
+> return (!xplay_attack(a,b));
 
 
 Pattern Intrusion38
@@ -1569,12 +1664,13 @@
 
 :8,B,value(30)
 
-cDO
+cDf
 bae
 
 ;safe_omove(a)
 ;&& (o_somewhere(e) || oplay_attack(a,e,e))
 ;&& !oplay_defend_both(a,b,c,b,D)
+>return (!xplay_attack(e,f));
 
 
 Pattern Intrusion45
@@ -1667,6 +1763,24 @@
 
 ;oplay_attack(a,b) && ! attack(b)
 >return (!xplay_attack(a,c));
+
+Pattern Intrusion50
+# ab added (3.1.25)
+
+?..
+OX!
+...
+---
+
+:8,BO,value(30)
+  
+?c.
+dXa
+.b.
+---
+
+;!oplay_attack_either(a,b,c,c,d)
+
 
 Pattern Nonterritory1
 
Index: patterns/endgame.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/endgame.db,v
retrieving revision 1.28
diff -u -r1.28 endgame.db
--- patterns/endgame.db 6 Feb 2002 18:43:05 -0000       1.28
+++ patterns/endgame.db 11 Feb 2002 21:28:16 -0000
@@ -229,7 +229,6 @@
 
 
 Pattern EE6Y
-# gf Added followup value. (3.1.14)
 
 .OOOXX
 ...*..
@@ -1007,7 +1006,7 @@
 ....
 ----       
 
-:8,eOXY,terri(1),followup(3)
+:8,eOXFY,terri(1),followup(3)
 
 OO*?
 XX.X
@@ -1074,7 +1073,7 @@
 ..*
 ---
 
-:8,OX,followup(4)
+:8,OXFY,followup(4)
 
 ?b?
 a.X
@@ -1092,7 +1091,7 @@
 O*..
 ----
 
-:8,OX,followup(2)
+:8,OXFY,followup(2)
 
 ?XX.
 O*ab
@@ -1107,7 +1106,7 @@
 O*...
 -----
 
-:8,OX,followup(4)
+:8,OXFY,followup(4)
 
 ?XX..
 O*ab.
@@ -1122,7 +1121,7 @@
 O*....
 ------
 
-:8,OX,followup(6)
+:8,OXFY,followup(6)
 
 ?XX...
 O*ab..
@@ -1139,7 +1138,7 @@
 ....
 ----
 
-:8,X,followup(3)
+:8,XFY,followup(3)
 
 ..X?
 .DO*
@@ -1417,7 +1416,7 @@
 .*          one point sente
 xX
 
-:8,eXOY,terri(1),followup(2)
+:8,eXOY,terri(1)
 
 XO
 a*
@@ -1629,7 +1628,7 @@
 *..
 ?X?
 
-:-,XY,followup(1)
+:-,XFY,followup(1)
 
 ?X?
 *a.
@@ -1647,7 +1646,7 @@
 x.x
 X*X
 
-:|,XY,followup(2)
+:|,XFY,followup(2)
 
 xBx
 AdC
Index: patterns/fuseki.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/fuseki.db,v
retrieving revision 1.9
diff -u -r1.9 fuseki.db
--- patterns/fuseki.db  1 Feb 2002 17:28:44 -0000       1.9
+++ patterns/fuseki.db  11 Feb 2002 21:28:19 -0000
@@ -111,6 +111,7 @@
 
 
 Pattern F2
+# Made attack dependent on extension space (3.1.25) /ab
 
 |..???.ooo   low kakari against star
 |...X.....
@@ -119,7 +120,7 @@
 |.........
 +---------
 
-:8,FEea
+:8,FEe
 
 
 Pattern F3
@@ -135,6 +136,7 @@
 
 
 Pattern F4
+# Made attack dependent on extension space (3.1.25) /ab
 
 |.........   high kakari against star
 |...X.*...
@@ -143,10 +145,23 @@
 |.........
 +---------
 
+:8,FE
+
+
+Pattern F4a
+
+|.........oo   high kakari against star
+|...X.*...oo
+|.........oo
+|...........
+|...........
++-----------
+
 :8,FEa
 
 
 Pattern F5
+# Made attack dependent on extension space (3.1.25) /ab
 
 |.........   far high kakari against star
 |...X..*..
@@ -155,6 +170,18 @@
 |.........
 +---------
 
+:8,FE
+
+
+Pattern F5a
+
+|.........oo   far high kakari against star
+|...X..*..oo
+|.........oo
+|.........oo
+|.........oo
++-----------
+
 :8,FEa
 
 
@@ -1040,7 +1067,7 @@
 .........
 ---------
 
-:8,Fted
+:8,ted
 
 ......xxx
 ......abx
@@ -2187,7 +2214,7 @@
 |.....
 +-----
 
-:8,Fj
+:8,Fjad
 
 
 Pattern J37
Index: patterns/helpers.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/helpers.c,v
retrieving revision 1.27
diff -u -r1.27 helpers.c
--- patterns/helpers.c  6 Feb 2002 18:43:05 -0000       1.27
+++ patterns/helpers.c  11 Feb 2002 21:28:21 -0000
@@ -381,7 +381,6 @@
 
   return success;
 }
-       
 
 /*
  * This is intended for use in autohelpers.
Index: patterns/patterns.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.db,v
retrieving revision 1.52
diff -u -r1.52 patterns.db
--- patterns/patterns.db        6 Feb 2002 18:43:05 -0000       1.52
+++ patterns/patterns.db        11 Feb 2002 21:28:45 -0000
@@ -5007,7 +5007,16 @@
 |...
 +---
 
-:8,OXb,followup(1),reverse_followup(3)
+:8,OXbFY,followup(1),reverse_followup(3)
+
+Pattern EB709Y
+
+|.XO    extending in the corner is huge: double sente
+|*O.
+|...
++---
+
+:8,OXbY,reverse_followup(3)
 
 
 Pattern EB709b
@@ -5815,7 +5824,7 @@
 O*..
 ----
 
-:8,OXe,followup(6)
+:8,OXeFY,followup(6)
 
 ?x??
 ?Xbc
@@ -5824,6 +5833,22 @@
 
 ;xmoyo(c) && oplay_attack(*,a,a) && !oplay_attack(*,a,b,*)
 
+Pattern EB1101Y
+
+?x??       big push in sente
+?X..
+O*..
+----
+
+:8,OXeY
+
+?x??
+?Xbc
+O*a.
+----
+
+;xmoyo(c) 
+
 
 Pattern EB1102
 
@@ -5832,7 +5857,7 @@
 O*..
 ----
 
-:8,OXe,followup(4)
+:8,OXeFY,followup(4)
 
 ?x??
 ?Xbd




reply via email to

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