Updated README: Equal sign not required with `--mode` flag.
[sgk-go] / patterns / owl_vital_apats.db
CommitLineData
7eeb782e
AT
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# The Owl urgent offensive pattern database. These are patterns
26# which are always matched. The patterns in owl_attackpats.db
27# are not matched if owl_shapes finds that the dragon has two
28# eyes. So the patterns in this database are exceptional ones
29# corresponding to defects in the optical code.
30#
31# Further documentation may be found in the Texinfo documentation.
32#
33# First there is a pattern title of the form: Pattern [string]. The
34# string is used for identifying the pattern while tuning or debugging.
35#
36# Then a block of the following characters representing the pattern
37# itself.
38#
39# ? : don't care
40# . : empty
41# X : your piece,
42# O : my piece,
43# x : your piece or empty
44# o : my piece or empty
45# * : my next move
46# ! : your defense move against * (if different)
47# -, | : edge of board
48# + : corner of board
49#
50# If a pattern must not match at the edge of the board,
51# an extra row of ?'s in the pattern may be added. (This
52# will not add to the time taken to check the pattern.)
53#
54#################
55#
56# In the second field (classification) the following pattern attributes
57# are possible. Friendly stones are 'O', opponent stones are 'X'.
58#
59# s : "Sacrifice" pattern. Omit the usual check that an O stone here
60# cannot be capture.
61#
62# n : In addition to usual check that an O stone here cannot be
63# captured, check also that an X move cannot be captured.
64#
65
66
67attribute_map value_only
68
69goal_elements Xx
70callback_data !
71
72
73Pattern VA1
74
75?x?? threaten two eyes simultaneously
76X.X?
77.X*O
78X.X?
79
80:8,-,value(75)
81
82?x??
83A.d?
84cX*a
85XbX?
86
87; lib(a)>2 && owl_topological_eye(b,A)==2 && owl_topological_eye(c,A)==2 && oplay_attack(*,d)
88
89
90Pattern VA2
91
92|XXO? remaining ko potential
93|..XO
94|*X.X
95|..XX
96+----
97
98:8,s,value(45)
99
100|AAO?
101|..XO
102|*X.B
103|..BB
104+----
105
106;lib(A)==2 && lib(B)==2
107
108
109Pattern VA3
110
111|XX??? may still be possible to kill through bent four in the corner
112|OXx?O
113|O.XX*
114|.....
115+-----
116
117:8,-,value(45)
118
119
120Pattern VA4
121
122|XX?? may still be possible to kill through bent four in the corner
123|OXx?
124|O.XX
125|.*.X
126+----
127
128:8,s,value(45)
129
130
131Pattern VA5
132
133|X?? take ko for possible nakade
134|*X?
135|XOx
136|Oox
137+---
138
139:8,s,value(45)
140
141
142Pattern VA6
143# Workaround for mistake related to false margins.
144
145XXXO?
146O.OX*
147-----
148
149:8,s,value(45)
150
151XXXO?
152a.OX*
153-----
154
155;lib(a)==2
156
157
158Pattern VA7
159
160|XXx bent four in the corner
161|O.X
162|OXx
163|*OX
164+---
165
166:8,s,value(45)
167
168
169Pattern VA8
170
171*Xx
172X.X
173XXO
174
175:8,s,value(45)
176
177*Xx
178A.X
179AAO
180
181;lib(A)==2 && olib(*)>1
182
183
184Pattern VA9
185# nn Modified constraint (3.3.14)
186
187X* atari inside eyespace
188
189:-,s,value(45)
190
191A*
192
193;lib(A)==2 && olib(*)>1 && owl_big_eyespace(*)
194;&& (owl_eye_size(*) <= 8 || !oplay_attack(*,*))
195
196
197Pattern VA10
198
199X* atari inside eyespace with ko
200
201:-,s,value(35)
202
203A*
204
205;lib(A)==2 && olib(*)==1 && owl_big_eyespace(*) && oplay_attack(*,*)!=WIN
206
207
208Pattern VA11
209
210?XX??? chance to get nakade
211XOOXXx
212!OX*.x
213------
214
215:8,s,value(65)
216
217?XX???
218XaaXXx
219.aX*.x
220------
221
222;attack(a) && !defend(a)
223
224
225Pattern VA12
226
227|xx??
228|.X?? try to kill with bent four in the corner
229|OXXx
230|X*.x
231+----
232
233:8,s,value(75)
234
235
236Pattern VA13
237# This is almost identical to attack pattern A1330. It is needed in
238# both places.
239
240|XX? take ko to maybe kill
241|*XX
242|XOX
243|O!O
244+---
245
246:8,s,value(85)
247
248|AA?
249|*AA
250|XOA
251|OaO
252+---
253
254;lib(A)<=3 && oplay_attack(a,a)
255
256
257# nn Removal candidate (3.3.14)
258# Success rate in regressions : 0% (0/131)
259
260Pattern VA14
261
262?OX force X to defend inside own eyespace
263OX!
264*XO
265---
266
267:8,-,value(35)
268
269?bX
270ODa
271*Dc
272---
273
274;lib(b)>1 && lib(c)>1 && owl_eyespace(a) && !attack(D)
275
276
277Pattern VA15
278
279X.? sacrifice to destroy eye
280X*X
281OX.
282
283:8,s,value(45)
284
285Ac?
286A*X
287bXd
288
289;lib(A) == 2 && lib(b) > 1 && !oplay_attack(*,c,d,d)
290
291
292Pattern VA16
293
294----
295.X.X play safely inside eyespace to falsify eye
296.*Xx
297X..?
298
299:8,-,value(46)
300
301----
302.X.X
303.*Xx
304X..?
305
306;owl_eyespace(*)
307
308
309Pattern VA17
310
311xXXOo exploit shortage of liberties
312!O*XO
313.X.Xo
314
315:8,s,value(35)
316
317xXXOo
318aO*XO
319.X.Xo
320
321; oplay_attack(*,a,a)
322
323
324Pattern VA18
325
326XX!O throw in to kill an eye
327.*X?
328XXO?
329
330:8,-,value(35)
331
332XXaO
333.*X?
334XXO?
335
336; oplay_attack(*,a,a)
337
338
339Pattern VA19
340# gf New pattern. (3.1.11)
341
342OX.x peep at edge
343X.*.
344XX..
345----
346
347:8,s,value(75)
348
349OX.x
350A.*.
351AA..
352----
353
354;lib(A)==2 && owl_big_eyespace(*)
355
356
357Pattern VA20
358# tm New pattern. (3.1.13)
359# see trevor:450
360
361?X?
362X.X
363*X?
364X.X
365?X?
366
367:-,-,value(75)
368
369?X?
370XaX
371*C?
372XbX
373?X?
374
375; owl_topological_eye(a,C) == 2
376; && owl_topological_eye(b,C) == 2
377
378
379Pattern VA21
380# gf New pattern. (3.1.14)
381# gf Revised pattern. (3.1.17)
382
383XO? bogus eyespace
384.*X
385...
386---
387
388:8,-,value(75)
389
390XO?
391.*X
392.a.
393---
394
395;owl_big_eyespace(a)
396
397
398Pattern VA22
399# gf New pattern. (3.1.14)
400
401x.O bogus eyespace
402.*X
403...
404---
405
406:8,-,value(75)
407
408xaO
409.*B
410...
411---
412
413;owl_big_eyespace(*) && oplay_attack(*,a,B)
414
415
416Pattern VA23
417# gf New pattern. (3.1.14)
418
419??O? bogus eyespace
420x.*X
421....
422....
423----
424
425:8,-,value(75)
426
427??O?
428xc*X
429.ba.
430....
431----
432
433;owl_big_eyespace(*) && oplay_attack(*,a,b,c,a)
434
435
436Pattern VA24
437# gf New pattern. (3.1.14)
438# gf Revise constraint to update for changed olib behaviour. (3.7.8)
439
440X* capture inside eyespace, not ko
441
442:-,-,value(76)
443
444A*
445
446;lib(A)==1 && owl_eyespace(*) && olib(*) > 1
447
448
449Pattern VA25
450# tm New pattern. (3.1.15) (see cho1:161)
451
452?OO| special corner shape.
453*X.|
454XOX|
455XO.|
456---+
457
458:8,-,value(76)
459
460
461Pattern VA26
462# gf New pattern. (3.1.15)
463
464??XX? making nakade is only chance to kill, unless we can capture
465?XO!X some of the wall
466X*XOX
467X.OX?
468?XX??
469
470:8,s,value(70)
471
472
473Pattern VA26b
474# gf New pattern. (3.1.15)
475# This pattern is entirely bogus. VA25 gives the correct attack point
476# but currently we also need this pattern to get a second match, which
477# is necessary to offset the fact that X is thought to have three
478# eyes.
479
480??XX? making nakade is only chance to kill, unless we can capture
481?XO.X some of the wall
482X.XOX
483X*OX?
484?XX??
485
486:8,s,value(0)
487
488
489Pattern VA27
490# gf New pattern. (3.1.15)
491
492XX?? not two certain eyes
493.*xX
494OXOx
495----
496
497:8,s,value(45)
498
499XX??
500.*AX
501OXOB
502----
503
504;x_somewhere(A,B)
505
506
507Pattern VA28
508# gf New pattern. (3.1.15)
509
510XX?? not two certain eyes
511.OxX
512*XOx
513----
514
515:8,s,value(45)
516
517XX??
518.OAX
519*XOB
520----
521
522;x_somewhere(A,B)
523
524
525Pattern VA29
526# gf New pattern. (3.1.15)
527
528|XXX? not two certain eyes
529|!O.X
530|OX*x
531+----
532
533:8,s,value(45)
534
535
536Pattern VA30
537# gf New pattern. (3.1.15)
538
539?XX! atari to destroy eye
540X.*X
541?XX?
542
543:8,s,value(45)
544
545?XXb
546Xa*X
547?CC?
548
549;lib(C)==2 && owl_eyespace(a) && oplay_attack(*,a,b,b)!=WIN
550
551
552Pattern VA31
553# tm New pattern (3.1.15) (see maeda0:60)
554# gf Added constraint. (3.5.5)
555
556?O.|
557OX.|
558X.X|
559X!*|
560??.|
561
562:8,s,value(76)
563
564?Oa|
565OXb|
566X.X|
567X!*|
568??.|
569
570;!oplay_attack(a,?,b,a)
571
572
573Pattern VA32
574# tm New pattern (3.1.15) (see maeda0:60)
575# gf Added constraint. (3.5.5)
576
577?O*|
578OX!|
579X.X|
580XXO|
581
582:8,s,value(76)
583
584?O*|
585OXb|
586X.X|
587XXa|
588
589;lib(a)>1 || !oplay_attack(*,?,b,*)==WIN
590
591
592Pattern VA33
593# tm New pattern (3.1.15)
594
595?X|
596XO|
597!O|
598*X|
599
600:8,-,value(76)
601
602
603Pattern VA34
604# tm New pattern (3.1.15)
605# See also VA27
606
607?X?
608XOX
609!OX
610*XO
611
612:8,-,value(76)
613
614?X?
615XOX
616.OX
617*XA
618
619; oplay_defend_both(*,A,*)
620
621
622Pattern VA35
623
624?XX|
625X..|
626X*X|
627XO.|
628---+
629
630:8,s,value(45)
631
632?XX|
633XA.|
634X*X|
635XO.|
636---+
637
638; xlib(A)==2
639
640
641Pattern VA36
642
643?XXX| cut black up
644X.OX|
645XX*O|
646?OX.|
647??XX|
648
649:8,s,value(45)
650
651
652Pattern VA37
653# tm New Pattern (3.1.15)
654
655?xXO?
656?X.XO
657O.X!*
658-----
659
660:8,-,value(45)
661
662?xXO?
663?X.XO
664A.X.*
665-----
666
667;lib(A) > 2
668
669
670Pattern VA38
671# gf New pattern. (3.1.15)
672# See trevora:25
673
674??O
675x!. capture a string at the edge of an eyespace
676.*X
677...
678---
679
680:8,-,value(80)
681
682??O
683x..
684.*A
685...
686---
687
688;owl_big_eyespace(*) && !oplay_defend(*,A)
689
690
691Pattern VA39
692# tm New Pattern (3.1.16)
693# gf Revised constraint. (3.5.4)
694
695XO*| atari to kill eye
696!XX|
697XOO|
698
699:8,s,value(95)
700
701XO*|
702aXX|
703Xbb|
704
705;owl_eyespace(a) && olib(*)>1 && lib(b)>1
706
707
708Pattern VA40
709# tm New Pattern (3.1.16) (see trevora:550)
710
711OXx Threaten snapback inside eyespace.
712X..
713X.*
714X..
715
716:8,s,value(95)
717
718OXx
719X..
720A.*
721X..
722
723; lib(A) == 3
724
725
726Pattern VA41
727# tm New Pattern (3.1.16)
728
729XXO
730.*X
731!.X
732
733:8,s,value(95)
734
735XBO
736.*A
737..X
738
739;lib(A) ==2 || lib(B) == 2
740
741
742Pattern VA42
743# tm New Pattern (3.1.16)
744
745X*X double attack on safe eye
746.X.
747X.X
748OXX
749
750:8,-,value(75)
751
752b*c
753.X.
754X.X
755DXX
756
757;!attack(D) && oplay_attack(*,b) && oplay_attack(*,c)
758
759
760Pattern VA43
761# tm New Pattern (3.1.17)
762
763XXX.
764.O*.
765----
766
767:8,s,value(50)
768
769XXXb
770.O*a
771----
772
773; !oplay_attack(*,a,b,b)
774; && !oplay_attack(*,b,a,a)
775
776
777Pattern VA44
778# tm New Pattern (3.1.17)
779# gf Fixed symmetry. (3.3.6)
780# nn Modified constraint (3.3.14)
781# gf Revised constraint. (3.5.3)
782
783XoX
784o*o
785
786:|,s,value(57)
787
788XbX
789a*c
790
791; owl_proper_eye(*)
792; && (owl_proper_eye(a) + owl_proper_eye(b) + owl_proper_eye(c) > 2)
793; && safe_xmove(*)
794; && ((owl_eye_size(*) <= 8 && owl_maxeye(*)>1) || !oplay_attack(*,*))
795
796
797Pattern VA45
798# tm New Pattern (3.1.17)
799
800X* cut to create false eye
801OX
802--
803
804:8,-,value(75)
805
806X*
807OX
808--
809
810; !ko(*)
811
812
813Pattern VA46
814# tm New Pattern (3.1.17)
815# see trevor:650
816
817?X???
818X.X??
819?X.O*
820
821:8,-,value(75)
822
823?X???
824CbX??
825?XAO*
826
827; xlib(A) == 1
828; && olib(A) == 1
829; && owl_topological_eye(b,C) < 4 && owl_topological_eye(b,C) > 0
830
831
832Pattern VA47a
833# tm Moved from owl_attackpats (3.1.17)
834# was A1107
835# gf Split with respect to ko. (3.7.9)
836
837O* defend the surrounding chain
838XO
839
840:/,-,value(95)
841
842a*
843Xb
844
845;vital_chain(a) && vital_chain(b) && !ko(*) && !xplay_defend_both(*,a,b)
846
847
848Pattern VA47b
849# tm Moved from owl_attackpats (3.1.17)
850# was A1107
851# gf Split with respect to ko. (3.7.9)
852
853O* defend the surrounding chain
854XO
855
856:/,-,value(65)
857
858a*
859Xb
860
861;vital_chain(a) && vital_chain(b) && ko(*) && !xplay_defend_both(*,a,b)
862
863
864Pattern VA48
865# tm New Pattern (3.1.18)
866
867+----
868|.*..
869|XX!O
870
871:8,s,value(75)
872
873
874Pattern VA49
875# tm New Pattern (3.1.18) (see trevor:430)
876# FIXME: This is non-sense if the ataried stone has neighbours
877# in atari (see trevorb:360)
878
879X* atari outside eyespace
880oX
881
882:8,-,value(35)
883
884X*
885AB
886
887; lib(B) <= 2 && owl_eyespace(A)
888
889
890Pattern VA50
891# pp New pattern (3.3.10)
892
893|xx??
894|Ox?? try to kill with bent four in the corner
895|OXXx
896|X*.x
897+----
898
899:8,s,value(45)
900
901
902Pattern VA51
903# pp New pattern (3.3.12)
904
905|*Oo start an unfavourable ko
906|.XO
907|X.X
908|.Xx
909|.O.
910+---
911
912:8,-,value(35)
913
914
915Pattern VA52a
916# gf New pattern. (3.3.20)
917
918|*Oo make X short of liberties
919|.XO
920|X.X
921|..X
922|OXX
923|.X?
924+---
925
926:8,-,value(65)
927
928
929Pattern VA52b
930# gf New pattern. (3.3.20)
931
932|*Oo
933|OXO make X short of liberties
934|.XO
935|X.X
936|..X
937|OXX
938|.X?
939+---
940
941:8,-,value(65)
942
943
944Pattern VA53
945# gf New pattern. (3.3.20)
946# See ld_owl:68.
947
948|XXX nakade if X cannot squeeze
949|O.X
950|XOX
951|*OX
952+---
953
954:8,s,value(75)
955
956|AAA
957|O.A
958|XOA
959|*OA
960+---
961
962;lib(A)==2
963
964
965Pattern VA54
966# mh New pattern (3.5.4)
967# See ld_owl:413/414
968
969X.X play atari inside one eye to destroy the other eye
970*XO
971
972:8,s,value(45)
973
974XaX
975*BO
976
977;lib(B)==2 && olib(*)>=2 && owl_proper_eye(*) && owl_maxeye(a)>0
978
979
980Pattern VA55
981# gf New pattern. (3.7.9)
982# See ld_owl:406.
983
984?X? force opponent to fill one eye
985X.X
986.XO
987*.?
988---
989
990:8,s,value(45)
991
992?X?
993X.X
994bXO
995*a?
996---
997
998;xlib(a)==3 && oplay_lib(*,a,b,b)>1
999
1000
1001Pattern VA56
1002# gf New pattern. (3.7.9)
1003# See ld_owl:326.
1004
1005xXOo destroy eye
1006X.XO
1007OX.*
1008----
1009
1010:8,-,value(45)
1011
1012xXOo
1013XaXO
1014OX.*
1015----
1016
1017;owl_mineye(a)==1
1018
1019
1020# END OF FILE