Updated README: Equal sign not required with `--mode` flag.
[sgk-go] / patterns / attack.db
CommitLineData
7eeb782e
AT
1# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
2# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
3# http://www.gnu.org/software/gnugo/ for more information. #
4# #
5# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
6# 2008 and 2009 by the Free Software Foundation. #
7# #
8# This program is free software; you can redistribute it and/or #
9# modify it under the terms of the GNU General Public License #
10# as published by the Free Software Foundation - version 3, #
11# or (at your option) any later version. #
12# #
13# This program is distributed in the hope that it will be #
14# useful, but WITHOUT ANY WARRANTY; without even the implied #
15# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR #
16# PURPOSE. See the GNU General Public License in file COPYING #
17# for more details. #
18# #
19# You should have received a copy of the GNU General Public #
20# License along with this program; if not, write to the Free #
21# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, #
22# Boston, MA 02111, USA. #
23# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
24#
25# attack.db - pattern database for finding tactical attack moves
26#
27# The tactical reading functions try to capture by attacking
28# on the immediate liberties plus certain caps and backfilling
29# moves. This database is intended to find additional attacking
30# moves. Notice though that these patterns doesn't help the
31# tactical reading to find attacking moves later in a move
32# sequence but only at stackp=0.
33#
34# See patterns.db for a specification of the current database format.
35#
36# Since these patterns are matched during make_worms() it doesn't
37# make any sense to use classifications such as X and O. No other
38# classification is useful either except A since we only have
39# tactical attack moves here.
40#
41# The semantics of these patterns are that the move at * is tried as
42# an attack of each X string in the pattern. The patterns are matched
43# with either player as O.
44#
45##################################################################
46
47
48attribute_map none
49
50goal_elements none
51callback_data X
52
53
54Pattern Attack1
55# Even if a ladder works (and is found by the tactical reading) we
56# also want to consider the geta capture.
57
58XOO? capture one stone
59OX..
60O.*?
61?.??
62
63:8,A
64
65
66Pattern Attack2
67
68OOXX push to capture X
69.XO*
70....
71----
72
73:8,A
74
75
76Pattern Attack4
77
78*OX extend to kill
79.XO
80
81:8,A
82
83
84Pattern Attack5
85
86|.X
87|XO
88|*.
89|.X
90
91:8,A
92
93
94Pattern Attack6
95
96?X block to attack and defend
97?O
98X*
99O.
100
101:8,A
102
103
104Pattern Attack10
105
106?O. common geta
107OX.
108O.*
109?.?
110
111:8,A
112
113
114Pattern Attack11
115
116o..?? catch two stones in a net
117O.*.?
118?X..o
119?X.oo
120??O??
121
122:8,A
123
124
125Pattern Attack13
126
127----
128....
129X...
130O*.O
131
132:8,A
133
134
135Pattern Attack14
136
137?.? Sometimes better to capture indirectly
138*.O
139OXO
140?O?
141
142:8,A
143
144
145Pattern Attack15
146
147XOX Capture one step away
148X.*
149---
150
151:8,A,NULL
152
153AOX
154A.*
155---
156
157; lib(A)==1
158
159
160Pattern Attack16
161
162?*X? Capture with snapback
163O.OX
164?XX?
165
166:8,A
167
168?*X?
169b.OX
170?AA?
171
172;lib(A)==1 && olib(*)>1 && lib(b)>1
173
174
175Pattern Attack17
176# This is only intended for finding an alternative attack. It should
177# have a constraint to first check whether the move above * was
178# successful.
179# FIXME: Add necessary machinery for this.
180
181?X?
182O.O
183?*o
184
185:8,A
186
187
188Pattern Attack18
189# gf New pattern. (3.3.4)
190
191OX
192O.
193X*
194--
195
196:8,A
197
198
199Pattern Attack19
200# pp New pattern (3.3.18)
201
202*.O May be better to capture indirectly
203O.X
204..O
205
206:8,A
207
208*.O
209O.A
210..O
211
212; lib(A) == 1
213
214
215# END OF FILE