# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 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 #
# 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 #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# The Owl urgent offensive pattern database. These are patterns
# which are always matched. The patterns in owl_attackpats.db
# are not matched if owl_shapes finds that the dragon has two
# eyes. So the patterns in this database are exceptional ones
# corresponding to defects in the optical code.
# Further documentation may be found in the Texinfo documentation.
# First there is a pattern title of the form: Pattern [string]. The
# string is used for identifying the pattern while tuning or debugging.
# Then a block of the following characters representing the pattern
# x : your piece or empty
# ! : your defense move against * (if different)
# If a pattern must not match at the edge of the board,
# an extra row of ?'s in the pattern may be added. (This
# will not add to the time taken to check the pattern.)
# In the second field (classification) the following pattern attributes
# are possible. Friendly stones are 'O', opponent stones are 'X'.
# s : "Sacrifice" pattern. Omit the usual check that an O stone here
# n : In addition to usual check that an O stone here cannot be
# captured, check also that an X move cannot be captured.
?x?? threaten two eyes simultaneously
; lib(a)>2 && owl_topological_eye(b,A)==2 && owl_topological_eye(c,A)==2 && oplay_attack(*,d)
|XXO? remaining ko potential
|XX??? may still be possible to kill through bent four in the corner
|XX?? may still be possible to kill through bent four in the corner
|X?? take ko for possible nakade
# Workaround for mistake related to false margins.
|XXx bent four in the corner
# nn Modified constraint (3.3.14)
;lib(A)==2 && olib(*)>1 && owl_big_eyespace(*)
;&& (owl_eye_size(*) <= 8 || !oplay_attack(*,*))
X* atari inside eyespace with ko
;lib(A)==2 && olib(*)==1 && owl_big_eyespace(*) && oplay_attack(*,*)!=WIN
?XX??? chance to get nakade
|.X?? try to kill with bent four in the corner
# This is almost identical to attack pattern A1330. It is needed in
|XX? take ko to maybe kill
;lib(A)<=3 && oplay_attack(a,a)
# nn Removal candidate (3.3.14)
# Success rate in regressions : 0% (0/131)
?OX force X to defend inside own eyespace
;lib(b)>1 && lib(c)>1 && owl_eyespace(a) && !attack(D)
X.? sacrifice to destroy eye
;lib(A) == 2 && lib(b) > 1 && !oplay_attack(*,c,d,d)
.X.X play safely inside eyespace to falsify eye
xXXOo exploit shortage of liberties
XX!O throw in to kill an eye
# gf New pattern. (3.1.11)
;lib(A)==2 && owl_big_eyespace(*)
# tm New pattern. (3.1.13)
; owl_topological_eye(a,C) == 2
; && owl_topological_eye(b,C) == 2
# gf New pattern. (3.1.14)
# gf Revised pattern. (3.1.17)
# gf New pattern. (3.1.14)
;owl_big_eyespace(*) && oplay_attack(*,a,B)
# gf New pattern. (3.1.14)
;owl_big_eyespace(*) && oplay_attack(*,a,b,c,a)
# gf New pattern. (3.1.14)
# gf Revise constraint to update for changed olib behaviour. (3.7.8)
X* capture inside eyespace, not ko
;lib(A)==1 && owl_eyespace(*) && olib(*) > 1
# tm New pattern. (3.1.15) (see cho1:161)
?OO| special corner shape.
# gf New pattern. (3.1.15)
??XX? making nakade is only chance to kill, unless we can capture
# gf New pattern. (3.1.15)
# This pattern is entirely bogus. VA25 gives the correct attack point
# but currently we also need this pattern to get a second match, which
# is necessary to offset the fact that X is thought to have three
??XX? making nakade is only chance to kill, unless we can capture
# gf New pattern. (3.1.15)
XX?? not two certain eyes
# gf New pattern. (3.1.15)
XX?? not two certain eyes
# gf New pattern. (3.1.15)
|XXX? not two certain eyes
# gf New pattern. (3.1.15)
?XX! atari to destroy eye
;lib(C)==2 && owl_eyespace(a) && oplay_attack(*,a,b,b)!=WIN
# tm New pattern (3.1.15) (see maeda0:60)
# gf Added constraint. (3.5.5)
# tm New pattern (3.1.15) (see maeda0:60)
# gf Added constraint. (3.5.5)
;lib(a)>1 || !oplay_attack(*,?,b,*)==WIN
# tm New pattern (3.1.15)
# tm New pattern (3.1.15)
; oplay_defend_both(*,A,*)
# tm New Pattern (3.1.15)
# gf New pattern. (3.1.15)
x!. capture a string at the edge of an eyespace
;owl_big_eyespace(*) && !oplay_defend(*,A)
# tm New Pattern (3.1.16)
# gf Revised constraint. (3.5.4)
;owl_eyespace(a) && olib(*)>1 && lib(b)>1
# tm New Pattern (3.1.16) (see trevora:550)
OXx Threaten snapback inside eyespace.
# tm New Pattern (3.1.16)
;lib(A) ==2 || lib(B) == 2
# tm New Pattern (3.1.16)
X*X double attack on safe eye
;!attack(D) && oplay_attack(*,b) && oplay_attack(*,c)
# tm New Pattern (3.1.17)
; && !oplay_attack(*,b,a,a)
# tm New Pattern (3.1.17)
# gf Fixed symmetry. (3.3.6)
# nn Modified constraint (3.3.14)
# gf Revised constraint. (3.5.3)
; && (owl_proper_eye(a) + owl_proper_eye(b) + owl_proper_eye(c) > 2)
; && ((owl_eye_size(*) <= 8 && owl_maxeye(*)>1) || !oplay_attack(*,*))
# tm New Pattern (3.1.17)
X* cut to create false eye
# tm New Pattern (3.1.17)
; && owl_topological_eye(b,C) < 4 && owl_topological_eye(b,C) > 0
# tm Moved from owl_attackpats (3.1.17)
# gf Split with respect to ko. (3.7.9)
O* defend the surrounding chain
;vital_chain(a) && vital_chain(b) && !ko(*) && !xplay_defend_both(*,a,b)
# tm Moved from owl_attackpats (3.1.17)
# gf Split with respect to ko. (3.7.9)
O* defend the surrounding chain
;vital_chain(a) && vital_chain(b) && ko(*) && !xplay_defend_both(*,a,b)
# tm New Pattern (3.1.18)
# tm New Pattern (3.1.18) (see trevor:430)
# FIXME: This is non-sense if the ataried stone has neighbours
# in atari (see trevorb:360)
X* atari outside eyespace
; lib(B) <= 2 && owl_eyespace(A)
# pp New pattern (3.3.10)
|Ox?? try to kill with bent four in the corner
# pp New pattern (3.3.12)
|*Oo start an unfavourable ko
# gf New pattern. (3.3.20)
|*Oo make X short of liberties
# gf New pattern. (3.3.20)
|OXO make X short of liberties
# gf New pattern. (3.3.20)
|XXX nakade if X cannot squeeze
X.X play atari inside one eye to destroy the other eye
;lib(B)==2 && olib(*)>=2 && owl_proper_eye(*) && owl_maxeye(a)>0
# gf New pattern. (3.7.9)
?X? force opponent to fill one eye
;xlib(a)==3 && oplay_lib(*,a,b,b)>1
# gf New pattern. (3.7.9)