| 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 | # defense.db - pattern database for finding tactical defense moves |
| 26 | # |
| 27 | # The tactical reading functions try to defend by playing on the |
| 28 | # immediate liberties only. This database is intended to find |
| 29 | # additional defense moves. Notice though that these patterns doesn't |
| 30 | # help the tactical reading to find defense moves later in a move |
| 31 | # sequence but only at stackp=0. |
| 32 | # |
| 33 | # See patterns.db for a specification of the current database format. |
| 34 | # |
| 35 | # Since these patterns are matched during make_worms() it doesn't |
| 36 | # make any sense to use classifications such as X and O. No other |
| 37 | # classification than D is useful either since we only have tactical |
| 38 | # defense moves here. |
| 39 | # |
| 40 | # The semantics of these patterns are that the move at * is tried |
| 41 | # as a defense for each attackable O string in the pattern. |
| 42 | # The patterns are matched with either player as O. |
| 43 | # |
| 44 | # FIXME: There are still some redundant patterns. |
| 45 | # |
| 46 | ################################################################## |
| 47 | |
| 48 | |
| 49 | attribute_map none |
| 50 | |
| 51 | goal_elements none |
| 52 | callback_data O |
| 53 | |
| 54 | |
| 55 | Pattern Def1 |
| 56 | |
| 57 | X* |
| 58 | Ox |
| 59 | |
| 60 | :8,D |
| 61 | |
| 62 | X* |
| 63 | Ox |
| 64 | |
| 65 | ;olib(*)>1 |
| 66 | |
| 67 | |
| 68 | Pattern Def2 |
| 69 | # Require that the common tesuji at b doesn't invalidate this defense move. |
| 70 | |
| 71 | O.* |
| 72 | O.. |
| 73 | |
| 74 | :8,D |
| 75 | |
| 76 | a.* |
| 77 | a.b |
| 78 | |
| 79 | ;attack(a) && oplay_defend(*,b,a) |
| 80 | |
| 81 | |
| 82 | Pattern Def4 |
| 83 | |
| 84 | XOO? capture one stone |
| 85 | OX.. |
| 86 | O.*? |
| 87 | ?.?? |
| 88 | |
| 89 | :8,D |
| 90 | |
| 91 | |
| 92 | Pattern Def5 |
| 93 | |
| 94 | OXoO connect under |
| 95 | O*.. |
| 96 | .... |
| 97 | ---- |
| 98 | |
| 99 | :8,D |
| 100 | |
| 101 | |
| 102 | Pattern Def6 |
| 103 | |
| 104 | OXXO connect under (the connection may or may not be broken) |
| 105 | O.*. |
| 106 | .... |
| 107 | ---- |
| 108 | |
| 109 | :8,D |
| 110 | |
| 111 | |
| 112 | Pattern Def9 |
| 113 | |
| 114 | OX*O cut! |
| 115 | .OX? |
| 116 | |
| 117 | :8,D |
| 118 | |
| 119 | |
| 120 | Pattern Def10 |
| 121 | |
| 122 | XO? connection pattern |
| 123 | *.O |
| 124 | ?.? |
| 125 | |
| 126 | :8,D |
| 127 | |
| 128 | |
| 129 | Pattern Def12 |
| 130 | |
| 131 | ?O*X |
| 132 | o.XO |
| 133 | ?O.X |
| 134 | |
| 135 | :8,D |
| 136 | |
| 137 | |
| 138 | Pattern Def16 |
| 139 | |
| 140 | ----- |
| 141 | ...O? |
| 142 | *.OXO |
| 143 | XO.X? |
| 144 | ?XX?? |
| 145 | |
| 146 | :8,D |
| 147 | |
| 148 | |
| 149 | Pattern Def17 |
| 150 | |
| 151 | +---- |
| 152 | |.*oo |
| 153 | |O.o? defend with good eye shape |
| 154 | |XOOo |
| 155 | |XX?? |
| 156 | |
| 157 | :8,D |
| 158 | |
| 159 | |
| 160 | Pattern Def21 |
| 161 | |
| 162 | |oOO |
| 163 | |.X. |
| 164 | |.OX |
| 165 | |*XO |
| 166 | |.O? capture to connect |
| 167 | |
| 168 | :8,D |
| 169 | |
| 170 | |oaa |
| 171 | |.X. |
| 172 | |.OX |
| 173 | |*XO |
| 174 | |.O? |
| 175 | |
| 176 | ;lib(a)>2 |
| 177 | |
| 178 | |
| 179 | Pattern Def25 |
| 180 | |
| 181 | ?XO threaten to capture |
| 182 | ?OX |
| 183 | ..* |
| 184 | ?O. |
| 185 | |
| 186 | :8,D |
| 187 | |
| 188 | |
| 189 | Pattern Def26 |
| 190 | |
| 191 | O.O? Bamboo joint for defense |
| 192 | O.*? |
| 193 | |
| 194 | :8,D |
| 195 | |
| 196 | |
| 197 | Pattern Def28 |
| 198 | |
| 199 | ?O? |
| 200 | Ox* defend with eye shape |
| 201 | ?O? |
| 202 | |
| 203 | :-,D |
| 204 | |
| 205 | |
| 206 | Pattern Def29 |
| 207 | |
| 208 | ?X? make shape |
| 209 | .O. |
| 210 | ... |
| 211 | .*. |
| 212 | ?.? |
| 213 | |
| 214 | :|,D |
| 215 | |
| 216 | |
| 217 | Pattern Def39 |
| 218 | |
| 219 | ?X?.?? jump under |
| 220 | O..*.? |
| 221 | O....? |
| 222 | o....? |
| 223 | ------ |
| 224 | |
| 225 | :8,D |
| 226 | |
| 227 | |
| 228 | Pattern Def44 |
| 229 | |
| 230 | ??Xx? |
| 231 | XXO*. override solid connection |
| 232 | OO... |
| 233 | ..... |
| 234 | ----- |
| 235 | |
| 236 | :8,D |
| 237 | |
| 238 | |
| 239 | Pattern Def45 |
| 240 | |
| 241 | OOXX push to capture X |
| 242 | .XO* |
| 243 | .... |
| 244 | ---- |
| 245 | |
| 246 | :8,D |
| 247 | |
| 248 | |
| 249 | Pattern Def49 |
| 250 | |
| 251 | ??X? |
| 252 | O*.X Draw back to defend connection |
| 253 | ..OX |
| 254 | .... |
| 255 | ---- |
| 256 | |
| 257 | :8,D |
| 258 | |
| 259 | |
| 260 | Pattern Def50 |
| 261 | |
| 262 | ??o? hanging connection |
| 263 | ?O.* |
| 264 | XXO. |
| 265 | ---- |
| 266 | |
| 267 | :8,D |
| 268 | |
| 269 | |
| 270 | Pattern Def52 |
| 271 | |
| 272 | ?????? |
| 273 | ?....x jump into empty space |
| 274 | ?.*.OO |
| 275 | ?....x |
| 276 | ?????? |
| 277 | |
| 278 | :8,D |
| 279 | |
| 280 | |
| 281 | Pattern Def55 |
| 282 | # Not on edge |
| 283 | |
| 284 | ooo |
| 285 | O.O form eye to protect |
| 286 | .*X |
| 287 | |
| 288 | :8,D |
| 289 | |
| 290 | |
| 291 | Pattern Def56 |
| 292 | |
| 293 | xXO extend after hane |
| 294 | XO. |
| 295 | .*. |
| 296 | ... |
| 297 | |
| 298 | :8,D |
| 299 | |
| 300 | |
| 301 | Pattern Def57 |
| 302 | |
| 303 | ..O |
| 304 | o*X |
| 305 | ..O |
| 306 | |
| 307 | :-,D |
| 308 | |
| 309 | |
| 310 | Pattern Def58 |
| 311 | |
| 312 | ????? |
| 313 | ....? jump! (But not down to second line) |
| 314 | O.*.? |
| 315 | ....? |
| 316 | X...? |
| 317 | |
| 318 | :8,D |
| 319 | |
| 320 | |
| 321 | Pattern Def59 |
| 322 | |
| 323 | .... jump! |
| 324 | O.*. |
| 325 | .... |
| 326 | X.X. |
| 327 | |
| 328 | :8,D |
| 329 | |
| 330 | |
| 331 | Pattern Def60 |
| 332 | |
| 333 | OXO block opponent |
| 334 | .*. |
| 335 | ?.? |
| 336 | |
| 337 | :|,D |
| 338 | |
| 339 | |
| 340 | Pattern Def61 |
| 341 | |
| 342 | ?.? extend to defend |
| 343 | .*. |
| 344 | XO? |
| 345 | X.? |
| 346 | XO? |
| 347 | |
| 348 | :8,D |
| 349 | |
| 350 | |
| 351 | Pattern Def62 |
| 352 | |
| 353 | oOo? attach |
| 354 | ...? |
| 355 | .*X. |
| 356 | ...? |
| 357 | |
| 358 | :8,D |
| 359 | |
| 360 | |
| 361 | Pattern Def63 |
| 362 | |
| 363 | O.Oo |
| 364 | XO.. protect by drawing back |
| 365 | XX*O |
| 366 | |
| 367 | :8,D |
| 368 | |
| 369 | |
| 370 | Pattern Def68 |
| 371 | |
| 372 | o.X? try to defend by clamping to connect |
| 373 | OX*O |
| 374 | .... |
| 375 | ---- |
| 376 | |
| 377 | :8,D |
| 378 | |
| 379 | |
| 380 | Pattern Def69 |
| 381 | |
| 382 | OX* atari on opponent to defend |
| 383 | ?O. |
| 384 | |
| 385 | :8,D |
| 386 | |
| 387 | aC* |
| 388 | ?b. |
| 389 | |
| 390 | ;lib(a)>1 && lib(b)>1 && lib(C)<=2 && olib(*)>1 |
| 391 | |
| 392 | |
| 393 | Pattern Def70 |
| 394 | # pp New Pattern - see endgame:860 (3.5.1) |
| 395 | |
| 396 | OOOO* a very specific position (defend the stone on the first line) |
| 397 | O.... |
| 398 | XO... |
| 399 | ----- |
| 400 | |
| 401 | :8,D |
| 402 | |