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: Tue, 18 Nov 2003 23:18:24 +0100
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)

This tuning patch solves a batch of the gifu test cases and as a bonus
a few other as well.

- defend4() generates superstring moves
- semeai_move_reasons() revised
- induce_secondary_move_reasons() revised; do not allow owl attack moves
  to induce strategic defense of neighbors if involved in a semeai
- connection_value() revised to never give points for connection to
  inessential strings
- influence tuning
- endgame tuning
- eye tuning
- fuseki tuning
- owl tuning
- tuning

Breakage:

reading:192     pass (fails in cvs)
trevora:290     FAIL C8 [!C8]
ego:11          fail (passes in cvs)
trevorc:1080    FAIL L8 [!L8|K10|K9]
owl1:327        PASS 1 P19 [1 (O19|P19|Q19|Q17|N19)]
nngs3:130       PASS C7 [C7|C9]
nngs3:1190      PASS D17 [D17]
nngs4:160       PASS K8 [K8|L8]
nngs4:410       PASS E1 [E1]
ninestones:150  PASS C5 [C5|D5]
ninestones:370  FAIL O4 [R5]
ninestones:630  FAIL G15 [F5|H7]
tactics1:106    PASS F8 [F8|F6]
manyfaces1:30   FAIL B10 [C14]
gunnar:41       PASS D13 [D13]
arend2:130      PASS P17 [P17]
13x13b:18       PASS F3 [F3]
13x13b:40       PASS F8 [F8]
gifu03:103      PASS F17 [F17]
gifu03:106      PASS H1 [H1]
gifu03:206      PASS C13 [C13]
gifu03:303      PASS P18 [P18]
gifu03:502      PASS L10 [R9|L10|K12]
gifu03:601      PASS O16 [R12|O16|Q11|P14]
gifu03:603      PASS B16 [B16]
gifu03:604      PASS C8 [C8|F12|E12|G13|O7|P7|P6]
gifu03:701      PASS M18 [!O19]

Analysis of failures:

trevora:290
The test was only barely and accidentally passing before. The patch
makes no real difference in this test.

ego:11
T16 has inappropriately safety inessential (both before and after the
patch). After the patch this has more significant effects than before,
which is reasonable. I'll try to fix this in a later patch.

trevorc:1080
Real failure. Owl now finds a questionable defense of L10.

ninestones:370
Accidental in the same way as trevora:290.

ninestones:630
The owl reading of D8 gets a different result because it no longer
runs out of nodes, which I think should count as an improvement. I'm
not sure which owl result would be correct but to get it to pass after
the patch would need improvements in the handling of thrashing
dragons.

manyfaces1:30
Real failure or bad test case. The owl reading comes to different
conclusions after the patch.

/Gunnar

Index: engine/reading.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v
retrieving revision 1.126
diff -u -r1.126 reading.c
--- engine/reading.c    15 Nov 2003 00:59:14 -0000      1.126
+++ engine/reading.c    18 Nov 2003 21:31:59 -0000
@@ -1823,6 +1823,8 @@
 #if 0 
     hane_rescue_moves(str, libs, &moves);
 #endif
+  if (stackp <= superstring_depth)
+    superstring_moves(str, &moves, 4, 0);
   }
 
   order_moves(str, &moves, color, read_function_name, *move);
Index: engine/semeai.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/semeai.c,v
retrieving revision 1.63
diff -u -r1.63 semeai.c
--- engine/semeai.c     13 Nov 2003 22:48:41 -0000      1.63
+++ engine/semeai.c     18 Nov 2003 21:31:59 -0000
@@ -314,6 +314,7 @@
       else if (DRAGON(d).color == other
               && dragon2[d].semeai_attack_point
               && (dragon2[d].owl_attack_point == NO_MOVE
+                  || dragon2[d].owl_defense_point == NO_MOVE
                   || dragon2[d].semeai_attack_certain >= 
                      dragon2[d].owl_attack_certain)) {
        /* Your dragon can be attacked */
Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.113
diff -u -r1.113 value_moves.c
--- engine/value_moves.c        18 Nov 2003 08:55:46 -0000      1.113
+++ engine/value_moves.c        18 Nov 2003 21:32:06 -0000
@@ -599,7 +599,8 @@
        aa = move_reasons[r].what;
        for (i = 0; i < DRAGON2(aa).neighbors; i++) {
          int bb = dragon2[DRAGON2(aa).adjacent[i]].origin;
-         if (dragon[bb].color == color && worm[bb].attack_codes[0] == 0) {
+         if (dragon[bb].color == color && worm[bb].attack_codes[0] == 0
+             && !DRAGON2(bb).semeai) {
            add_strategical_defense_move(pos, bb);
            DEBUG(DEBUG_MOVE_REASONS, "Strategic defense at %1m induced for %1m 
due to owl attack on %1m\n",
                  pos, bb, aa);
@@ -1023,6 +1024,9 @@
       return 0.0;
   }
 
+  if (safetyb == INESSENTIAL)
+    return 0.0;
+  
   if (crude_weakness_a == 0.0
       || dragon[dragona].status == DEAD)
     return 0.0;
Index: patterns/barriers.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/barriers.db,v
retrieving revision 1.58
diff -u -r1.58 barriers.db
--- patterns/barriers.db        4 Nov 2003 10:05:08 -0000       1.58
+++ patterns/barriers.db        18 Nov 2003 21:32:07 -0000
@@ -428,9 +428,10 @@
 
 
 Pattern Barrier26
+# gf Revised pattern. (3.5.3)
 
-X,.x
-x.,X
+X,,x
+x,,X
 
 :O,A
 
@@ -1003,6 +1004,18 @@
 :8,D
 
 
+Pattern Barrier67
+# gf New pattern. (3.5.3)
+
+....O
+O,,,.
+.....
+.....
+-----
+
+:8,D
+
+
 #########################################################
 #                                                       #
 #   Intrusion patterns (secondary influence sources)    #
@@ -1954,15 +1967,16 @@
 Pattern Intrusion48
 # ab New pattern. (3.1.23)
 # FIXME: This would need a constraint. The one below did not work.
+# gf Revised. (3.5.3)
 
-?X.
+?x.
 ...
 Q.!
 ..X
 
 :8,B,value(20)
 
-# .X.
+# .x.
 # fce
 # Oba
 # .dX
@@ -2218,6 +2232,24 @@
 ;!oplay_connect(a,b,c,D,E)
 
 
+Pattern Intrusion62
+# gf New pattern. (3.5.3)
+# See gifu03:206
+
+.Xo
+.Q.
+!XO
+
+:8,B,value(20)
+
+.Xo
+bQa
+cDO
+
+;oplay_attack(c,b,D)
+>return !safe_xmove(a) && !oplay_defend_both(c,b,a,b,D);
+
+
 #########################################################
 #                                                       #
 #                 Nonterritory patterns                 #
@@ -3202,5 +3234,81 @@
 
 >non_oterritory(e);
 
+
+Pattern Nonterritory48
+# gf New pattern. (3.5.3)
+# See gifu03:507.
+
+?.?
+O..
+?XO
+
+:8,t
+
+?d?
+Oab
+?Xc
+
+;!oplay_defend_both(a,b,a,c)
+
+>non_oterritory(b);
+>non_oterritory(d);
+
+
+Pattern Nonterritory51
+# gf New pattern. (3.5.3)
+# See gifu03:205.
+
+?O?
+..X
+..?
+
+:8,t
+
+?O?
+baX
+dc?
+
+;!oplay_attack(a,b,c,a) && !oplay_attack(a,c,b,a)
+
+>non_xterritory(d);
+
+
+Pattern Nonterritory52
+# gf New pattern. (3.5.3)
+# See gifu03:205.
+
+??O
+X..
+?..
+
+:8,t
+
+??O
+Xba
+?dc
+
+;!oplay_attack(a,b,c,a) && !oplay_attack(a,c,b,a)
+
+>non_xterritory(d);
+
+
+Pattern Nonterritory54
+# gf New pattern. (3.5.3)
+# See gifu03:206.
+
+.Ox
+.X.
+.OX
+
+:8,t
+
+.Ox
+bXa
+cdX
+
+;!safe_omove(a) && !oplay_defend_both(b,a,?,c,b,d)
+
+>non_oterritory(c);
 
 # END OF FILE
Index: patterns/endgame.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/endgame.db,v
retrieving revision 1.56
diff -u -r1.56 endgame.db
--- patterns/endgame.db 11 Nov 2003 21:48:58 -0000      1.56
+++ patterns/endgame.db 18 Nov 2003 21:32:07 -0000
@@ -428,6 +428,34 @@
 ; proper_eye(b) && oplay_attack(*,b,a,a) && oplay_defend(a,*,a)
 
 
+Pattern EE109
+# gf New pattern. (3.5.3)
+# Generic hane, let the territorial evaluation determine its value.
+
+OX        hane on first line
+.*
+--
+
+:8,OXe
+
+
+Pattern EE110
+# gf New pattern. (3.5.3)
+# Followup value obviously imprecise, usually an underestimation.
+
+OX.O        followup to save dead stones
+.*..
+----
+
+:8,Xe,followup(5)
+
+aX.b
+d*c.
+----
+
+;alive(a) && dead(b) && oplay_defend(*,c,d,b)
+
+
 # first line pushes (except in corner)
 ######################################
 
@@ -1103,6 +1131,7 @@
 # tm modified (3.1.20)
 # gf Removed terri(1) value. (3.1.29)
 # FIXME: see endgame:218, trevord:1030, trevorc:430
+# FIXME: This is no edge pattern, move it.
 
 O.
 *O
@@ -1594,6 +1623,17 @@
 ?O?
 
 :8,OXe
+
+
+Pattern CE33
+# gf New pattern. (3.5.3)
+# If both colors are alive this does at best fill a dame.
+
+OOO
+O*O
+?X?
+
+:8,OX,maxterri(0.1)
 
 
 ######################################################################
Index: patterns/eyes.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/eyes.db,v
retrieving revision 1.43
diff -u -r1.43 eyes.db
--- patterns/eyes.db    11 Nov 2003 21:48:59 -0000      1.43
+++ patterns/eyes.db    18 Nov 2003 21:32:07 -0000
@@ -5361,6 +5361,24 @@
 
 Pattern 77000
 
+ x
+ XX
+.*.!
+
+:1122
+
+
+Pattern 77001
+
+ x
+ XX
+.X.!
+
+:0111
+
+
+Pattern 77010
+
  !
  .x
 !.*x
Index: patterns/fuseki19.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/fuseki19.db,v
retrieving revision 1.8
diff -u -r1.8 fuseki19.db
--- patterns/fuseki19.db        18 Jul 2003 18:59:22 -0000      1.8
+++ patterns/fuseki19.db        18 Nov 2003 21:32:16 -0000
@@ -13623,32 +13623,34 @@
 :8,-,value(9)
 
 
-Pattern Fuseki488
-# 6/39
-
-+-------------------+
-|...................|
-|...................|
-|...O...............|
-|...............X...|
-|...................|
-|...................|
-|...................|
-|...................|
-|..O................|
-|...................|
-|...................|
-|...................|
-|...................|
-|...................|
-|...................|
-|...O.*.........X...|
-|.....X.............|
-|...................|
-|...................|
-+-------------------+
-
-:8,-,value(6)
+# Pattern Fuseki488
+# # 6/39
+# # gf Removed. (3.5.3)
+# # Frowned upon, see gifu03:601.
+# 
+# +-------------------+
+# |...................|
+# |...................|
+# |...O...............|
+# |...............X...|
+# |...................|
+# |...................|
+# |...................|
+# |...................|
+# |..O................|
+# |...................|
+# |...................|
+# |...................|
+# |...................|
+# |...................|
+# |...................|
+# |...O.*.........X...|
+# |.....X.............|
+# |...................|
+# |...................|
+# +-------------------+
+# 
+# :8,-,value(6)
 
 
 Pattern Fuseki489
Index: patterns/owl_attackpats.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/owl_attackpats.db,v
retrieving revision 1.98
diff -u -r1.98 owl_attackpats.db
--- patterns/owl_attackpats.db  13 Nov 2003 22:48:44 -0000      1.98
+++ patterns/owl_attackpats.db  18 Nov 2003 21:32:17 -0000
@@ -1168,6 +1168,24 @@
 :8,-,value(50)
 
 
+Pattern A241
+# gf New pattern. See gifu03:303. (3.5.3)
+
+O.YO         connect beneath
+o.*o
+....
+----
+
+:8,-,value(37)
+
+a.Yb
+o.*o
+....
+----
+
+;!oplay_disconnect(*,a,b)
+
+
 #########################################################
 #                                                       #
 #          Limiting moves on the first line             #
@@ -2006,6 +2024,8 @@
 # tm Modified (3.1.16)
 #   Added ??? rows, make sure not at upper edge.
 # ab This is indeed too generic.
+# gf Added constraint to make it slightly less generic. (3.5.3)
+# See trevora:620,630 and gifu03:303 for relevant testcases.
 
 ???|
 ???|
@@ -2014,6 +2034,13 @@
 
 :8,-,value(45)
 
+???|
+?b?|
+Ya.|
+O*.|
+
+;x_somewhere(b) || oplay_attack(a,b,a)
+
 
 Pattern A514
 # tm New Pattern (3.1.15)
@@ -2178,15 +2205,16 @@
 ;lib(c) > 1 && !oplay_attack(*,a,b,*)
 
 
-Pattern A607
+Pattern A607a
+# gf Split pattern. (3.5.3)
 
-xYO        there is death in the hane
+XYO        there is death in the hane
 .*.
 ---
 
 :8,s,value(36)
 
-xYa
+XYa
 b*.
 ---
 
@@ -2194,6 +2222,22 @@
 
 
 Pattern A607b
+# gf Split pattern and revised constraint. (3.5.3)
+
+.YO        there is death in the hane
+.*.
+---
+
+:8,s,value(36)
+
+.Ya
+b*.
+---
+
+;!oplay_attack(*,a) && !obvious_false_xeye(b) && owl_maxeye(b)>0
+
+
+Pattern A607c
 # gf New pattern. (3.1.12)
 
 xYO        the push is also deadly
@@ -2424,6 +2468,7 @@
 
 Pattern A621
 # spl added 3.3.22
+# gf Revised constraint. (3.5.3)
 
 ?XOo? threaten to make ko or nakade
 X..*.
@@ -2435,7 +2480,7 @@
 X..*.
 -----
 
-;lib(A)<3
+;lib(A)<3 && owl_eyespace(*)
 
 
 #########################################################
@@ -4516,6 +4561,22 @@
 ---
 
 ; lib(A) == 1 && owl_escape_value(B) > 0
+
+
+Pattern A1135
+# gf New pattern. (3.5.3)
+
+..OY
+X.*.
+----
+
+:8,-,value(75)
+
+..OB
+A.*.
+----
+
+;owl_escape_value(A)>0 && !xplay_disconnect(*,A,B) && !oplay_connect(*,A,B)
 
 
 #########################################################
Index: patterns/owl_defendpats.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/owl_defendpats.db,v
retrieving revision 1.107
diff -u -r1.107 owl_defendpats.db
--- patterns/owl_defendpats.db  13 Nov 2003 22:48:44 -0000      1.107
+++ patterns/owl_defendpats.db  18 Nov 2003 21:32:27 -0000
@@ -516,6 +516,28 @@
 ;oplay_attack(*,a,b,c) && !attack(c)
 
 
+Pattern D125
+# gf New pattern. (3.5.3)
+
+?oo?
+...X        escape or build further on the edge
+.X*.
+.o.O
+....
+----
+
+:8,-,value(77)
+
+?ab?
+...X
+.X*.
+.o.O
+....
+----
+
+;owl_escape_value(a)>0 || owl_escape_value(b)>0
+
+
 #########################################################
 #                                                       #
 #          Expanding moves on the second line           #
@@ -4851,19 +4873,36 @@
 :8,-,value(80)
 
 
-Pattern D1201
+Pattern D1201a
+# gf Split pattern. (3.5.3)
 
 XOo         atari to build eyespace
 *.O
-?oo
+ooo
 
 :8,-,value(50)
 
 AOo
 *.O
-?oo
+ooo
 
 ; lib(A)==2
+
+
+Pattern D1201b
+# gf Split pattern and revised constraint. (3.5.3)
+
+XOo         atari to build eyespace
+*.O
+Xoo
+
+:8,-,value(50)
+
+AOo
+*.O
+Boo
+
+; lib(A)==2 && !oplay_defend_both(*,A,B)
 
 
 Pattern D1202
Index: patterns/patterns.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.db,v
retrieving revision 1.118
diff -u -r1.118 patterns.db
--- patterns/patterns.db        13 Nov 2003 22:48:44 -0000      1.118
+++ patterns/patterns.db        18 Nov 2003 21:32:31 -0000
@@ -1476,6 +1476,7 @@
 
 
 Pattern EC8
+# gf Revised constraint. (3.5.3)
 
 ?X.O      connect
 O*..
@@ -1484,12 +1485,12 @@
 
 :8,XC,shape(2)
 
-?DbO
-O*ac
+?X.b
+a*..
 ....
 ----
 
-;!oplay_defend_both(*,a,b,a,D) && oplay_attack_either(*,b,a,c,b,c)
+;oplay_disconnect(a,b) && !oplay_disconnect(*,a,b)
 
 
 Pattern EC8a
@@ -3306,6 +3307,50 @@
 :8,Xd
 
 
+Pattern ES3a
+# gf New pattern. (3.5.3)
+
+..O..
+....X         invade with support from above
+X.*..
+.....
+.....
+-----
+
+:8,OEa
+
+..a..
+....X
+X.*..
+.....
+.....
+-----
+
+;!weak(a)
+
+
+Pattern ES3b
+# gf New pattern. (3.5.3)
+
+..O..
+....X         invade with support from above
+X.*..
+.....
+.....
+-----
+
+:8,Oea
+
+..a..
+..b.X
+X.*..
+.....
+.....
+-----
+
+;!weak(a) && oplay_connect(*,b,*,a)
+
+
 ######################################################################
 #
 # Edge block/expand patterns
@@ -4973,6 +5018,18 @@
 :8,OXe,reverse_followup(6)
 
 
+Pattern EB643
+# gf New pattern. (3.5.3)
+# See gifu03:506.
+
+?.O       block on edge
+O*.
+X..
+---
+
+:8,OXe
+
+
 ###################
 # First line blocks
 ###################
@@ -5738,23 +5795,25 @@
 
 
 Pattern EB1008b
+# gf Added n classification. See gifu03:105. (3.5.3)
 
 ?..X.      Double sente, do it early!
 x.O*.
 .....
 -----
 
-:8,OX,reverse_followup(2)
+:8,OXn,reverse_followup(2)
 
 
 Pattern EB1008c
+# gf Added n classification. See gifu03:105. (3.5.3)
 
 ?..X.      Double sente, do it early!
 x.O*.
 .....
 -----
 
-:8,OX,reverse_followup(5)
+:8,OXn,reverse_followup(5)
 
 ?..X.
 x.a*.
@@ -7739,12 +7798,13 @@
 
 
 Pattern CB297
+# gf Added a classification. (3.5.3)
 
 Oooo         block in sente
 .*.o
 OX??
 
-:8,OXe,followup(5)
+:8,OXea,followup(5)
 
 Oooo
 .*.o
@@ -9152,6 +9212,17 @@
 ..X.
 
 :8,OXda,shape(3)
+
+
+Pattern CB342
+# gf New pattern. (3.5.3)
+
+?.X.?       extend to prevent hane and split
+O..*.
+o....
+oooOo
+
+:8,OXe
 
 
 ######################################################################




reply via email to

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