# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 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. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# attack.db - pattern database for finding tactical attack moves
# The tactical reading functions try to capture by attacking
# on the immediate liberties plus certain caps and backfilling
# moves. This database is intended to find additional attacking
# moves. Notice though that these patterns doesn't help the
# tactical reading to find attacking 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 is useful either except A since we only have
# tactical attack moves here.
# The semantics of these patterns are that the move at * is tried as
# an attack of each X string in the pattern. The patterns are matched
# with either player as O.
##################################################################
# Even if a ladder works (and is found by the tactical reading) we
# also want to consider the geta capture.
?X block to attack and defend
o..?? catch two stones in a net
?.? Sometimes better to capture indirectly
XOX Capture one step away
?*X? Capture with snapback
;lib(A)==1 && olib(*)>1 && lib(b)>1
# This is only intended for finding an alternative attack. It should
# have a constraint to first check whether the move above * was
# FIXME: Add necessary machinery for this.
# gf New pattern. (3.3.4)
# pp New pattern (3.3.18)
*.O May be better to capture indirectly