gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] tuning patch


From: Gunnar Farneback
Subject: [gnugo-devel] tuning patch
Date: Wed, 12 Jun 2002 17:30:25 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Here's a patch with smallish amounts of mixed tuning.

- moves to connect two dragons which are both adjacent to a thrashing
  dragon are appreciated by the move valuation
- tuning
- influence tuning
- connection tuning
- eye tuning
- joseki tuning

The test results show 7 passes and no failures. The passes are:

nngs1:     2
lazarus:   5, 13
trevorc:   610, 990
13x13:     39
strategy4: 220

/Gunnar

Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.39
diff -u -r1.39 value_moves.c
--- engine/value_moves.c        29 May 2002 09:26:49 -0000      1.39
+++ engine/value_moves.c        12 Jun 2002 15:25:22 -0000
@@ -1967,6 +1967,48 @@
        break;
        
       case CONNECT_MOVE:
+
+       /* If the opponent just added a stone to a dead dragon, which is
+        * adjacent to both dragons being connected, then the connection
+        * is probably a good way to make sure the thrashing dragon
+        * stays dead. If we are ahead, add a safety move here, at most
+        * half the margin of victory.
+        *
+        * This does not apply if we are doing scoring.
+        *
+        * FIXME: The margin of victory limit is not implemented.
+        */
+      
+       if (!doing_scoring) {
+         int cc;
+         worm1 = conn_worm1[move_reasons[r].what];
+         worm2 = conn_worm2[move_reasons[r].what];
+         aa = dragon[worms[worm1]].origin;
+         bb = dragon[worms[worm2]].origin;
+         cc = get_last_opponent_move(color);
+         
+         if (cc != NO_MOVE
+             && dragon[cc].matcher_status == DEAD
+             && are_neighbor_dragons(aa, cc)
+             && are_neighbor_dragons(bb, cc)) {
+           if (aa == bb)
+             this_value = 1.6 * dragon[cc].effective_size;
+           else if (DRAGON2(aa).safety == INESSENTIAL
+                    || DRAGON2(bb).safety == INESSENTIAL)
+             this_value = 0.8 * dragon[cc].effective_size;
+           else
+             this_value = 1.7 * dragon[cc].effective_size;
+           
+           d1 = find_dragon(cc);
+           if (this_value > dragon_value[d1]) {
+             dragon_value[d1] = this_value;
+             DEBUG(DEBUG_MOVE_REASONS,
+                   "  %1m:   %f - connect %1m and %1m to attack thrashing 
dragon %1m\n",
+                   pos, this_value, aa, bb, cc);
+           }
+         }
+       }
+
        if (!move[pos].move_safety)
          break;
        /* Otherwise fall through. */
Index: patterns/attack.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/attack.db,v
retrieving revision 1.7
diff -u -r1.7 attack.db
--- patterns/attack.db  10 Oct 2001 19:05:06 -0000      1.7
+++ patterns/attack.db  12 Jun 2002 15:25:22 -0000
@@ -176,4 +176,15 @@
 :8,A
 
 
+Pattern Attack18
+# gf New pattern. (3.3.4)
+
+OX
+O.
+X*
+--
+
+:8,A
+
+
 # END OF FILE
Index: patterns/barriers.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/barriers.db,v
retrieving revision 1.34
diff -u -r1.34 barriers.db
--- patterns/barriers.db        29 May 2002 09:26:49 -0000      1.34
+++ patterns/barriers.db        12 Jun 2002 15:25:22 -0000
@@ -2502,4 +2502,22 @@
 >non_xterritory(c);
 
 
+Pattern Nonterritory35
+# gf New pattern. (3.3.4)
+
+..O
+..X
+
+:/,t
+
+caO
+dbX
+
+;!oplay_attack(a,b,c,a) && !oplay_attack(a,c,b,a)
+
+>non_xterritory(b);
+>non_xterritory(c);
+>non_xterritory(d);
+
+
 # END OF FILE
Index: patterns/conn.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/conn.db,v
retrieving revision 1.24
diff -u -r1.24 conn.db
--- patterns/conn.db    3 Jun 2002 15:00:59 -0000       1.24
+++ patterns/conn.db    12 Jun 2002 15:25:22 -0000
@@ -810,6 +810,23 @@
 ;!xplay_connect(*,a,b)
 
 
+Pattern CB18
+
+?X?
+X.X        workaround for ko contingent connection
+OXO
+?O*
+
+:8,BY
+
+?X?
+XbX
+OAd
+?c*
+
+;xplay_attack(*,A)<WIN && !xplay_connect(*,?,b,c,d)
+
+
 ########################
 #
 # C patterns on the edge
Index: patterns/eyes.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/eyes.db,v
retrieving revision 1.20
diff -u -r1.20 eyes.db
--- patterns/eyes.db    16 May 2002 09:02:29 -0000      1.20
+++ patterns/eyes.db    12 Jun 2002 15:25:22 -0000
@@ -1428,13 +1428,21 @@
 Pattern 6205
 
   !
+x..x@
+
+:2,1
+
+
+Pattern 6206
+
+  !
 !x..!
  ---
 
 :0,0
 
 
-Pattern 6206
+Pattern 6207
 # tm New Pattern (3.1.22) (see owl:111)
 
   @
@@ -1443,7 +1451,7 @@
 :1,0
 
 
-Pattern 6207
+Pattern 6208
 # tm modified (3.1.22)
 
   !
@@ -2039,6 +2047,15 @@
 
 
 Pattern 7023
+# Defending the other marginal vertex is always incorrect.
+
+  !
address@hidden
+
+:2,1
+
+
+Pattern 7024
 
   . @|
 !...x|
@@ -2047,7 +2064,7 @@
 :2,1
 
 
-Pattern 7024
+Pattern 7025
 
   x
 !x*xx!
@@ -2055,7 +2072,7 @@
 :2,1
 
 
-Pattern 7025
+Pattern 7026
 
   )
 ..>..@
@@ -2063,7 +2080,7 @@
 :2,1
 
 
-Pattern 7026
+Pattern 7027
 
   !
 !..x.!
Index: patterns/hoshi.sgf
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/hoshi.sgf,v
retrieving revision 1.11
diff -u -r1.11 hoshi.sgf
--- patterns/hoshi.sgf  13 May 2002 18:04:55 -0000      1.11
+++ patterns/hoshi.sgf  12 Jun 2002 15:25:22 -0000
@@ -77,7 +77,7 @@
 
 (;W[rf]C[S]MA[mj];B[og]C[S]MA[mj])
 
-(;W[qe]C[S]MA[mj];B[og]C[S]MA[mj])
+(;W[qe]C[0]MA[mj];B[og]C[S]MA[mj])
 )
 
 (;B[qd]C[S]MA[ij];C[#b blocks below];W[pc]C[S]MA[mj]
Index: patterns/patterns.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.db,v
retrieving revision 1.77
diff -u -r1.77 patterns.db
--- patterns/patterns.db        3 Jun 2002 15:01:00 -0000       1.77
+++ patterns/patterns.db        12 Jun 2002 15:25:23 -0000
@@ -8906,6 +8906,7 @@
 
 Pattern CB336
 # db New pattern (3.1.28)
+# gf FIXME: This is an edge pattern. Should be moved to EBxxx. (3.3.4)
 
 ?Xxx??         simply extend to avoid bad aji
 oOX.x?
@@ -8958,6 +8959,22 @@
 
 ;(x_somewhere(d,e,f,g,h) || xarea(f))
 ;&& !oplay_disconnect(*,b,*,a) && !oplay_disconnect(*,c,*,a)
+
+
+Pattern CB339
+# gf New pattern. (3.3.4)
+
+?x?
+x.O
+.*X
+
+:8,OXe
+
+?x?
+xaO
+c*B
+
+;xterri(c) && oplay_attack_either(*,a,a,B)
 
 
 ######################################################################



reply via email to

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