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