File: defense.db

package info (click to toggle)
gnugo 3.8-9
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 17,412 kB
  • ctags: 4,302
  • sloc: ansic: 56,445; perl: 3,771; lisp: 2,804; sh: 722; makefile: 706; python: 682; awk: 113; sed: 22
file content (402 lines) | stat: -rw-r--r-- 5,185 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see       #
# http://www.gnu.org/software/gnugo/ for more information.          #
#                                                                   #
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,   #
# 2008 and 2009 by the Free Software Foundation.                    #
#                                                                   #
# This program is free software; you can redistribute it and/or     #
# modify it under the terms of the GNU General Public License       #
# as published by the Free Software Foundation - version 3,         #
# or (at your option) any later version.                            #
#                                                                   #
# This program is distributed in the hope that it will be           #
# useful, but WITHOUT ANY WARRANTY; without even the implied        #
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR           #
# PURPOSE.  See the GNU General Public License in file COPYING      #
# for more details.                                                 #
#                                                                   #
# You should have received a copy of the GNU General Public         #
# License along with this program; if not, write to the Free        #
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,       #
# Boston, MA 02111, USA                                             #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#  defense.db - pattern database for finding tactical defense moves
#
#  The tactical reading functions try to defend by playing on the
#  immediate liberties only. This database is intended to find
#  additional defense moves. Notice though that these patterns doesn't
#  help the tactical reading to find defense moves later in a move
#  sequence but only at stackp=0.
#
#  See patterns.db for a specification of the current database format.
#
#  Since these patterns are matched during make_worms() it doesn't
#  make any sense to use classifications such as X and O. No other
#  classification than D is useful either since we only have tactical
#  defense moves here.
#
#  The semantics of these patterns are that the move at * is tried
#  as a defense for each attackable O string in the pattern.
#  The patterns are matched with either player as O.
#
#  FIXME: There are still some redundant patterns.
#
##################################################################


attribute_map none

goal_elements none
callback_data O


Pattern Def1

X*
Ox

:8,D

X*
Ox

;olib(*)>1


Pattern Def2
# Require that the common tesuji at b doesn't invalidate this defense move.

O.*
O..

:8,D

a.*
a.b

;attack(a) && oplay_defend(*,b,a)


Pattern Def4

XOO?    capture one stone
OX..
O.*?
?.??

:8,D


Pattern Def5

OXoO    connect under
O*..
....
----

:8,D


Pattern Def6

OXXO    connect under (the connection may or may not be broken)
O.*.
....
----

:8,D


Pattern Def9

OX*O    cut!
.OX?

:8,D


Pattern Def10

XO?        connection pattern
*.O
?.?

:8,D


Pattern Def12

?O*X           
o.XO           
?O.X

:8,D


Pattern Def16

-----
...O?
*.OXO
XO.X?
?XX??

:8,D


Pattern Def17

+----
|.*oo
|O.o?     defend with good eye shape
|XOOo     
|XX??

:8,D


Pattern Def21

|oOO
|.X.
|.OX
|*XO
|.O?        capture to connect

:8,D

|oaa
|.X.
|.OX
|*XO
|.O?

;lib(a)>2


Pattern Def25

?XO           threaten to capture          
?OX
..*
?O.

:8,D


Pattern Def26

O.O?           Bamboo joint for defense
O.*?

:8,D


Pattern Def28

?O?
Ox*	    defend with eye shape
?O?

:-,D


Pattern Def29

?X?        make shape
.O.
...
.*.
?.?

:|,D


Pattern Def39

?X?.??       jump under
O..*.?
O....?
o....?
------

:8,D


Pattern Def44

??Xx?
XXO*.         override solid connection
OO...
.....
-----

:8,D


Pattern Def45

OOXX         push to capture X
.XO*
....
----

:8,D


Pattern Def49

??X?
O*.X         Draw back to defend connection
..OX
....
----

:8,D


Pattern Def50

??o?            hanging connection
?O.*
XXO.
----

:8,D


Pattern Def52

??????
?....x             jump into empty space
?.*.OO
?....x
??????

:8,D


Pattern Def55
# Not on edge

ooo
O.O      form eye to protect
.*X

:8,D


Pattern Def56

xXO             extend after hane
XO.
.*.
...

:8,D


Pattern Def57

..O
o*X
..O

:-,D


Pattern Def58

?????
....?          jump! (But not down to second line)
O.*.?
....?
X...?

:8,D


Pattern Def59

....           jump!
O.*.
....
X.X.

:8,D


Pattern Def60

OXO             block opponent
.*.
?.?

:|,D


Pattern Def61

?.?       extend to defend
.*.
XO?
X.?
XO?

:8,D


Pattern Def62

oOo?           attach
...?
.*X.
...?

:8,D


Pattern Def63

O.Oo
XO..     protect by drawing back
XX*O

:8,D


Pattern Def68

o.X?      try to defend by clamping to connect
OX*O
....
----

:8,D


Pattern Def69

OX*       atari on opponent to defend
?O.

:8,D

aC*
?b.

;lib(a)>1 && lib(b)>1 && lib(C)<=2 && olib(*)>1


Pattern Def70
# pp New Pattern - see endgame:860 (3.5.1)

OOOO*	  a very specific position (defend the stone on the first line)
O....
XO...
-----

:8,D