| 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 | |
| 48 | attribute_map none |
| 49 | |
| 50 | goal_elements none |
| 51 | callback_data X |
| 52 | |
| 53 | |
| 54 | Pattern Attack1 |
| 55 | # Even if a ladder works (and is found by the tactical reading) we |
| 56 | # also want to consider the geta capture. |
| 57 | |
| 58 | XOO? capture one stone |
| 59 | OX.. |
| 60 | O.*? |
| 61 | ?.?? |
| 62 | |
| 63 | :8,A |
| 64 | |
| 65 | |
| 66 | Pattern Attack2 |
| 67 | |
| 68 | OOXX push to capture X |
| 69 | .XO* |
| 70 | .... |
| 71 | ---- |
| 72 | |
| 73 | :8,A |
| 74 | |
| 75 | |
| 76 | Pattern Attack4 |
| 77 | |
| 78 | *OX extend to kill |
| 79 | .XO |
| 80 | |
| 81 | :8,A |
| 82 | |
| 83 | |
| 84 | Pattern Attack5 |
| 85 | |
| 86 | |.X |
| 87 | |XO |
| 88 | |*. |
| 89 | |.X |
| 90 | |
| 91 | :8,A |
| 92 | |
| 93 | |
| 94 | Pattern Attack6 |
| 95 | |
| 96 | ?X block to attack and defend |
| 97 | ?O |
| 98 | X* |
| 99 | O. |
| 100 | |
| 101 | :8,A |
| 102 | |
| 103 | |
| 104 | Pattern Attack10 |
| 105 | |
| 106 | ?O. common geta |
| 107 | OX. |
| 108 | O.* |
| 109 | ?.? |
| 110 | |
| 111 | :8,A |
| 112 | |
| 113 | |
| 114 | Pattern Attack11 |
| 115 | |
| 116 | o..?? catch two stones in a net |
| 117 | O.*.? |
| 118 | ?X..o |
| 119 | ?X.oo |
| 120 | ??O?? |
| 121 | |
| 122 | :8,A |
| 123 | |
| 124 | |
| 125 | Pattern Attack13 |
| 126 | |
| 127 | ---- |
| 128 | .... |
| 129 | X... |
| 130 | O*.O |
| 131 | |
| 132 | :8,A |
| 133 | |
| 134 | |
| 135 | Pattern Attack14 |
| 136 | |
| 137 | ?.? Sometimes better to capture indirectly |
| 138 | *.O |
| 139 | OXO |
| 140 | ?O? |
| 141 | |
| 142 | :8,A |
| 143 | |
| 144 | |
| 145 | Pattern Attack15 |
| 146 | |
| 147 | XOX Capture one step away |
| 148 | X.* |
| 149 | --- |
| 150 | |
| 151 | :8,A,NULL |
| 152 | |
| 153 | AOX |
| 154 | A.* |
| 155 | --- |
| 156 | |
| 157 | ; lib(A)==1 |
| 158 | |
| 159 | |
| 160 | Pattern Attack16 |
| 161 | |
| 162 | ?*X? Capture with snapback |
| 163 | O.OX |
| 164 | ?XX? |
| 165 | |
| 166 | :8,A |
| 167 | |
| 168 | ?*X? |
| 169 | b.OX |
| 170 | ?AA? |
| 171 | |
| 172 | ;lib(A)==1 && olib(*)>1 && lib(b)>1 |
| 173 | |
| 174 | |
| 175 | Pattern 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? |
| 182 | O.O |
| 183 | ?*o |
| 184 | |
| 185 | :8,A |
| 186 | |
| 187 | |
| 188 | Pattern Attack18 |
| 189 | # gf New pattern. (3.3.4) |
| 190 | |
| 191 | OX |
| 192 | O. |
| 193 | X* |
| 194 | -- |
| 195 | |
| 196 | :8,A |
| 197 | |
| 198 | |
| 199 | Pattern Attack19 |
| 200 | # pp New pattern (3.3.18) |
| 201 | |
| 202 | *.O May be better to capture indirectly |
| 203 | O.X |
| 204 | ..O |
| 205 | |
| 206 | :8,A |
| 207 | |
| 208 | *.O |
| 209 | O.A |
| 210 | ..O |
| 211 | |
| 212 | ; lib(A) == 1 |
| 213 | |
| 214 | |
| 215 | # END OF FILE |