[Top][All Lists]
[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, 21 Jan 2004 20:27:40 +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) |
Some mixed tuning and a new helper owl_lunch. Regression delta is
owl1:329 PASS 1 T4 [1 T4]
nngs2:150 PASS L3 [M3|L3]
and there's a slight reduction of nodes.
- new function and autohelper owl_lunch()
- lunches_are_current field no longer reset in owl_safe_move()
- eye tuning
- owl tuning
- endgame tuning
/Gunnar
Index: engine/liberty.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v
retrieving revision 1.206
diff -u -r1.206 liberty.h
--- engine/liberty.h 20 Jan 2004 22:57:40 -0000 1.206
+++ engine/liberty.h 21 Jan 2004 01:15:54 -0000
@@ -409,6 +409,7 @@
int owl_maxeye(int pos);
int owl_proper_eye(int pos);
int owl_eye_size(int pos);
+int owl_lunch(int str);
int owl_strong_dragon(int pos);
void owl_reasons(int color);
Index: engine/owl.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.189
diff -u -r1.189 owl.c
--- engine/owl.c 20 Jan 2004 22:42:11 -0000 1.189
+++ engine/owl.c 21 Jan 2004 01:15:57 -0000
@@ -5113,7 +5113,6 @@
safe = 1;
else
safe = 0;
- current_owl_data->lunches_are_current = 0;
popgo();
}
current_owl_data->safe_move_cache[move] = safe+1;
@@ -5639,6 +5638,29 @@
origin = current_owl_data->my_eye[pos].origin;
return current_owl_data->my_eye[origin].esize
- current_owl_data->my_eye[origin].msize;
+}
+
+
+/* Used by autohelpers.
+ * Returns whether str is a lunch.
+ */
+int
+owl_lunch(int str)
+{
+ int k;
+ int origin;
+ ASSERT_ON_BOARD1(str);
+ ASSERT1(current_owl_data->lunches_are_current, str);
+ origin = find_origin(str);
+
+ for (k = 0; k < MAX_LUNCHES; k++) {
+ if (current_owl_data->lunch[k] == NO_MOVE)
+ break;
+ if (current_owl_data->lunch[k] == origin)
+ return 1;
+ }
+
+ return 0;
}
Index: patterns/endgame.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/endgame.db,v
retrieving revision 1.57
diff -u -r1.57 endgame.db
--- patterns/endgame.db 19 Nov 2003 07:53:49 -0000 1.57
+++ patterns/endgame.db 21 Jan 2004 01:15:58 -0000
@@ -593,13 +593,14 @@
#########################
Pattern EE401
+# gf Added n classification. (3.5.2)
|.O? big endgame move
|.OX at least 2 points gote
|.*x
+---
-:8,OXed,terri(2)
+:8,nOXed,terri(2)
Pattern EE402
Index: patterns/eyes.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/eyes.db,v
retrieving revision 1.46
diff -u -r1.46 eyes.db
--- patterns/eyes.db 19 Jan 2004 14:07:39 -0000 1.46
+++ patterns/eyes.db 21 Jan 2004 01:15:58 -0000
@@ -701,17 +701,18 @@
|.
|X
-|xX.
+|.X.
+---
-:1111
+:1112
Pattern 5002
# Bent four in the corner.
|.
-|XXX.
+|X
+|XX.
+---
:1111
@@ -719,6 +720,16 @@
Pattern 5003
# Bent four in the corner.
+
+|.
+|XXX.
++---
+
+:1111
+
+
+Pattern 5004
+# Bent four in the corner.
#
# This one is tricky. Black has two certain eyes if there are at least
# two outside liberties, but at most one if they are fewer.
@@ -734,7 +745,7 @@
:1111
-Pattern 5004
+Pattern 5005
# Bent four in the corner.
#
# This pattern is similar to the previous one. Black has two certain eyes
@@ -749,7 +760,7 @@
:1111
-Pattern 5005
+Pattern 5006
# Bent four in the corner.
#
# This pattern behaves identically to the previous one.
@@ -761,7 +772,7 @@
:1111
-Pattern 5006
+Pattern 5007
# Bent four in the corner. The attack depends on ko and sufficiently
# few outer liberties if the corner vertex is empty.
@@ -772,7 +783,7 @@
:1122
-Pattern 5007
+Pattern 5008
# Bent four in the corner. The attack depends on ko and sufficiently
# few outer liberties if the corner vertex is empty.
@@ -783,7 +794,7 @@
:1122
-Pattern 5008
+Pattern 5009
# Bent four in the corner. An O move in the corner may or may not give
# another eye (depending on ko and/or outer liberties). An X move in
# the corner definitely settles the number of eyes to 1.
@@ -795,7 +806,7 @@
:1111
-Pattern 5009
+Pattern 5010
# Bent four in the corner.
|.
@@ -806,7 +817,7 @@
:1122
-Pattern 5010
+Pattern 5011
# Bent four shape that X must fight. Ko if at most one outer liberty.
|X
@@ -816,7 +827,7 @@
:1122
-Pattern 5011
+Pattern 5012
xxxxx
-----
@@ -5132,13 +5143,24 @@
Pattern 75004
+|.
+|*
+|X.
+|..!
++---
+
+:1122
+
+
+Pattern 75010
+
XX.
!..X
:1112
-Pattern 75005
+Pattern 75011
XXX
(.*X
@@ -5146,7 +5168,7 @@
:1122
-Pattern 75006
+Pattern 75012
xXx
@..x
@@ -5154,7 +5176,7 @@
:1122
-Pattern 75007
+Pattern 75020
X.(
(.*X
@@ -5162,7 +5184,7 @@
:1122
-Pattern 75008
+Pattern 75021
x.!
!..x
@@ -5170,7 +5192,7 @@
:0112
-Pattern 75009
+Pattern 75022
x.!
!.Xx
@@ -5590,6 +5612,15 @@
:1122
+Pattern 78511
+
+----
+..*.
+.XX
+
+:1122
+
+
Pattern 78520
|.
@@ -6308,6 +6339,18 @@
!
@..>...!
+
+:1122
+
+
+Pattern 90800
+
+|!
+|.
+|X.
+|X
+|...@
++---
:1122
Index: patterns/mkpat.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/mkpat.c,v
retrieving revision 1.128
diff -u -r1.128 mkpat.c
--- patterns/mkpat.c 7 Jan 2004 10:00:20 -0000 1.128
+++ patterns/mkpat.c 21 Jan 2004 01:16:00 -0000
@@ -335,6 +335,7 @@
{"owl_maxeye", 1, 0, 0.01, "owl_maxeye(%s)"},
{"owl_proper_eye", 1, 0, 0.01, "owl_proper_eye(%s)"},
{"owl_eye_size", 1, 0, 0.01, "owl_eye_size(%s)"},
+ {"owl_lunch", 1, 0, 0.01, "owl_lunch(%s)"},
{"owl_strong_dragon", 1, 0, 0.01, "owl_strong_dragon(%s)"},
{"has_aji", 1, 0, 0.01,
"(dragon[%s].owl_threat_status == CAN_THREATEN_DEFENSE)"},
Index: patterns/owl_attackpats.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/owl_attackpats.db,v
retrieving revision 1.103
diff -u -r1.103 owl_attackpats.db
--- patterns/owl_attackpats.db 18 Jan 2004 23:29:34 -0000 1.103
+++ patterns/owl_attackpats.db 21 Jan 2004 01:16:02 -0000
@@ -2297,6 +2297,9 @@
Pattern A607a
# gf Split pattern. (3.5.3)
+# gf Revised constraint. (3.5.4)
+# gf Comment: A607a and A607b could now be merged again but I think
+# it may be handy for later revisions to keep them apart.
XYO there is death in the hane
.*.
@@ -2308,11 +2311,12 @@
b*.
---
-;!oplay_attack(*,a) && !obvious_false_xeye(b)
+;owl_maxeye(b) > 0 && !oplay_attack(*,a) && !obvious_false_xeye(b)
Pattern A607b
# gf Split pattern and revised constraint. (3.5.3)
+# gf Reordered constraint for better performance. (3.5.4)
.YO there is death in the hane
.*.
@@ -2324,11 +2328,12 @@
b*.
---
-;!oplay_attack(*,a) && !obvious_false_xeye(b) && owl_maxeye(b)>0
+;owl_maxeye(b)>0 && !oplay_attack(*,a) && !obvious_false_xeye(b)
-Pattern A607b
+Pattern A607c
# gf New pattern. (3.1.12)
+# gf Reordered constraint for better performance. (3.5.4)
xYO the push is also deadly
.*O
@@ -2340,7 +2345,28 @@
b*a
---
-;!oplay_attack(*,b,a) && owl_eyespace(b)
+;owl_eyespace(b) && !oplay_attack(*,b,a)
+
+
+Pattern A607d
+# gf New pattern. (3.5.4)
+# gf Comment: A607a and A607b could now be merged again but I think
+# it may be handy for later revisions to keep them apart.
+
+?XYO there is death in the hane
+o.*.
+----
+
+:8,s,value(36)
+
+dXYa
+cb*.
+----
+
+;owl_maxeye(b)==0
+;&& ((o_somewhere(c) && owl_lunch(c))
+; || (o_somewhere(d) && owl_lunch(d)))
+;&& !oplay_attack(*,a) && !obvious_false_xeye(b)
Pattern A608
@@ -3931,6 +3957,40 @@
xCxx
;oplay_disconnect(*,a,B,C)
+
+
+Pattern A1024a
+# gf New pattern. (3.5.4)
+# Converse to D1386a
+
+YO.o connect along edge to strong dragon
+x*.X
+----
+
+:8,Eb,value(90)
+
+AO.o
+x*.B
+----
+
+;owl_strong_dragon(B) && !xplay_disconnect(*,A,B)
+
+
+Pattern A1024b
+# gf New pattern. (3.5.4)
+# Converse to D1386a
+
+XO.o connect along edge to strong dragon
+x*.Y
+----
+
+:8,Eb,value(90)
+
+BO.o
+x*.A
+----
+
+;owl_strong_dragon(B) && !xplay_disconnect(*,A,B)
#########################################################
Index: patterns/owl_vital_apats.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/owl_vital_apats.db,v
retrieving revision 1.43
diff -u -r1.43 owl_vital_apats.db
--- patterns/owl_vital_apats.db 19 Jan 2004 14:03:14 -0000 1.43
+++ patterns/owl_vital_apats.db 21 Jan 2004 01:16:02 -0000
@@ -667,6 +667,7 @@
Pattern VA39
# tm New Pattern (3.1.16)
+# gf Revised constraint. (3.5.4)
XO*| atari to kill eye
!XX|
@@ -675,10 +676,10 @@
:8,s,value(95)
XO*|
-AXX|
-XOO|
+aXX|
+Xbb|
-; owl_eyespace(A)
+;owl_eyespace(a) && olib(*)>1 && lib(b)>1
Pattern VA40