home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
1,000 Best Games for Windows
/
1000BestGamesForWindows.iso
/
sharewarefin
/
LINK4.ZIP
/
EXAMPLE.RUL
next >
Wrap
Text File
|
1993-07-09
|
11KB
|
1,215 lines
;------------------------------------------------------------------------------
; Patterns and rules to check for immediate win or prevent losing on next turn
;------------------------------------------------------------------------------
PATTERNS
abcd
a
b
c
d
a???
+b??
++c?
+++d
d???
+c??
++b?
+++a
ENDPATTERNS
RULES
a=*, b=X, c=X, d=X : a
a=X, b=*, c=X, d=X : b
a=*, b=O, c=O, d=O : a
a=O, b=*, c=O, d=O : b
ENDRULES
;------------------------------------------------------------------------------
; Eliminate columns which lead to an immediate loss
;------------------------------------------------------------------------------
PATTERNS
abOO
cd++
a???
cb??
?dO?
???O
ENDPATTERNS
RULES
a = O, d = * : d!
b = O, c = * : c!
ENDRULES
PATTERNS
O?-?
+O-?
++-?
++aO
ENDPATTERNS
RULES
a = * : a!
ENDRULES
PATTERNS
O??-
+O?-
++O-
+++-
+++a
ENDPATTERNS
RULES
a = * : a!
ENDRULES
;------------------------------------------------------------------------------
; Try to setup or prevent obvious two-way win situation
;------------------------------------------------------------------------------
PATTERNS
*abc*
*????
+a???
++b??
+++c?
++++*
*????
+c???
++b??
+++a?
++++*
ENDPATTERNS
RULES
a=*, b=X, c=X : a
a=X, b=*, c=X : b
a=*, b=O, c=O : a
a=O, b=*, c=O : b
ENDRULES
;------------------------------------------------------------------------------
; Rules governing other two-way win situations
;------------------------------------------------------------------------------
PATTERNS
???-
XXX-
?X?a
X???
X??-
?X?-
XXX-
???-
???a
??-X
??-?
XX-X
X?a?
?X-??
??-??
XX-X?
??a?X
ENDPATTERNS
RULES
a = * : a
ENDRULES
PATTERNS
???-
abc-
?X??
X???
???-
*abc
+X??
X???
a??-
?b?-
XXc-
???-
*??-
+a?-
XXb-
???c
??-c
??-?
ab-X
X???
ENDPATTERNS
RULES
a = *, b = X, c = X : a
a = X, b = *, c = X : b
a = X, b = X, c = * : c
a = *, b = -, c = X : a2
a = -, b = *, c = X : b2
a = *, b = X, c = - : a2
a = -, b = X, c = * : c2
a = X, b = *, c = - : b2
a = X, b = -, c = * : c2
ENDRULES
PATTERNS
?b-??
??-??
aX-c?
????d
ENDPATTERNS
RULES
a = *, b = X, c = X, d = X : a
a = X, b = X, c = *, d = X : c
ENDRULES
PATTERNS
??-d
??c?
?bX?
a?X?
ENDPATTERNS
RULES
a = *, b = X, c = *, d = X : c
a = X, b = *, c = *, d = X : c
a = X, b = X, c = *, d = * : c
a = *, b = -, c = -, d = X : a2
a = X, b = *, c = -, d = - : b2
a = -, b = X, c = -, d = * : d2
ENDRULES
; --- defensive ---
PATTERNS
???-
abc-
?O??
O???
???-
*abc
+O??
O???
a??-
?b?-
OOc-
???-
*??-
+a?-
OOb-
???c
??-c
??-?
ab-O
O???
ENDPATTERNS
RULES
a = *, b = O, c = O : a
a = O, b = *, c = O : b
a = O, b = O, c = * : c
a = *, b = -, c = O : a2
a = -, b = *, c = O : b2
a = *, b = O, c = - : a2
a = -, b = O, c = * : c2
a = O, b = *, c = - : b2
a = O, b = -, c = * : c2
ENDRULES
PATTERNS
?b-??
??-??
aO-c?
????d
ENDPATTERNS
RULES
a = *, b = O, c = O, d = O : a
a = O, b = O, c = *, d = O : c
a = *, b = -, c = O, d = O : a2
a = -, b = *, c = O, d = O : b2
a = *, b = O, c = O, d = - : a2
a = -, b = O, c = O, d = * : d2
ENDRULES
PATTERNS
??-d
??c?
?bO?
a?O?
ENDPATTERNS
RULES
a = *, b = O, c = *, d = O : c
a = O, b = *, c = *, d = O : c
a = O, b = O, c = *, d = * : c
a = *, b = -, c = -, d = O : a2
a = O, b = *, c = -, d = - : b2
a = -, b = O, c = -, d = * : d2
ENDRULES
;------------------------------------------------------------------------------
; Interesting offensive maneuver
;------------------------------------------------------------------------------
PATTERNS
???X
????
X--X
X*aX
ENDPATTERNS
RULES
a = * : a
ENDRULES
PATTERNS
???X
????
Xa*X
X???
ENDPATTERNS
RULES
a = * : a
ENDRULES
;------------------------------------------------------------------------------
; Miscellaneous defensive rules
;------------------------------------------------------------------------------
PATTERNS
???b
????
a--O
O--?
ENDPATTERNS
RULES
a = *, b = O : a
a = O, b = * : b
ENDRULES
PATTERNS
abcd???
???????
???????
???????
???????
???????
???????
?abdc??
???????
???????
???????
???????
???????
???????
ENDPATTERNS
RULES
a = O, b = O, d = * : d1
a = O, b = O, c = * : c1
a = O, c = O, d = * : d1
a = O, c = O, b = * : b1
a = O, d = O, c = * : c1
a = O, d = O, b = * : b1
ENDRULES
PATTERNS
???X???
?????a?
???X???
ENDPATTERNS
RULES
a = * : a2
ENDRULES
;------------------------------------------------------------------------------
; Try to setup potential win situations
;------------------------------------------------------------------------------
PATTERNS
XX-X???
abzcdef
XXX-???
abczdef
-XXX???
zabcdef
XXX-???
abczdef
-XXX???
zabcdef
X-XX???
azbcdef
X-XX???
azbcdef
XXX-???
abczdef
-XXX???
zabcdef
XX-X???
abzcdef
X-XX???
azbcdef
XX-X???
abzcdef
?XX-X??
abczdef
?XXX-??
abcdzef
?-XXX??
azbcdef
?XXX-??
abcdzef
?-XXX??
azbcdef
?X-XX??
abzcdef
?X-XX??
abzcdef
?XXX-??
abcdzef
?-XXX??
azbcdef
?XX-X??
abczdef
?X-XX??
abzcdef
?XX-X??
abczdef
X??????
?X?????
ab-cdef
??zX???
X??????
?X?????
??X????
???-???
abczdef
-abcdef
zX?????
??X????
???X???
X??????
?X?????
??X????
???-???
abczdef
-abcdef
zX?????
??X????
???X???
X??????
a-bcdef
?zX????
???X???
X??????
a-bcdef
?zX????
???X???
X??????
?X?????
??X????
???-???
abczdef
-abcdef
zX?????
??X????
???X???
X??????
?X?????
ab-cdef
??zX???
X??????
a-bcdef
?zX????
???X???
X??????
?X?????
ab-cdef
??zX???
?X?????
??X????
fab-cde
???zX??
?X?????
??X????
???X???
????-??
fabczde
f-abcde
?zX????
???X???
????X??
?X?????
??X????
???X???
????-??
fabczde
f-abcde
?zX????
???X???
????X??
?X?????
fa-bcde
??zX???
????X??
?X?????
fa-bcde
??zX???
????X??
?X?????
??X????
???X???
????-??
fabczde
f-abcde
?zX????
???X???
????X??
?X?????
??X????
fab-cde
???zX??
?X?????
fa-bcde
??zX???
????X??
?X?????
??X????
fab-cde
???zX??
??X????
???X???
efab-cd
????zX?
??X????
???X???
????X??
?????-?
efabczd
ef-abcd
??zX???
????X??
?????X?
??X????
???X???
????X??
?????-?
efabczd
ef-abcd
??zX???
????X??
?????X?
??X????
efa-bcd
???zX??
?????X?
??X????
efa-bcd
???zX??
?????X?
??X????
???X???
????X??
?????-?
efabczd
ef-abcd
??zX???
????X??
?????X?
??X????
???X???
efab-cd
????zX?
??X????
efa-bcd
???zX??
?????X?
??X????
???X???
efab-cd
????zX?
???X???
????X??
defab-c
?????zX
???X???
????X??
?????X?
??????-
defabcz
def-abc
???zX??
?????X?
??????X
???X???
????X??
?????X?
??????-
defabcz
def-abc
???zX??
?????X?
??????X
???X???
defa-bc
????zX?
??????X
???X???
defa-bc
????zX?
??????X
???X???
????X??
?????X?
??????-
defabcz
def-abc
???zX??
?????X?
??????X
???X???
????X??
defab-c
?????zX
???X???
defa-bc
????zX?
??????X
???X???
????X??
defab-c
?????zX
ENDPATTERNS
RULES
z = * : a2, b2, c2, d2, e2, f2
ENDRULES
;------------------------------------------------------------------------------
; General linking rules - try to obtain/prevent linearity of us/opponent
;------------------------------------------------------------------------------
PATTERNS
abc-
a???
?b??
??c?
???-
-???
?c??
??b?
???a
ENDPATTERNS
RULES
a = *, b = X, c = X : a2
a = X, b = *, c = X : b2
a = X, b = X, c = * : c2
a = *, b = O, c = O : a1
a = O, b = *, c = O : b1
a = O, b = O, c = * : c1
ENDRULES
PATTERNS
ab-c
a???
?b??
??-?
???c
c???
?-??
??b?
???a
ENDPATTERNS
RULES
a = *, b = X, c = X : a2
a = X, b = *, c = X : b2
a = X, b = X, c = * : c2
a = *, b = O, c = O : a1
a = O, b = *, c = O : b1
a = O, b = O, c = * : c1
ENDRULES
PATTERNS
ab--
a-b-
a--b
a???
?b??
??-?
???-
-???
?-??
??b?
???a
a???
?-??
??b?
???-
-???
?b??
??-?
???a
a???
?-??
??-?
???b
ENDPATTERNS
RULES
a = *, b = X : a2
a = X, b = * : b2
a = *, b = O : a1
a = O, b = * : b1
ENDRULES
;------------------------------------------------------------------------------
; Try to prevent opponent from being in position to obtain linearity
;------------------------------------------------------------------------------
PATTERNS
OO--???
abzcdef
OO--???
abczdef
-OO-???
zabcdef
-OO-???
abczdef
--OO???
zabcdef
--OO???
azbcdef
O-O-???
azbcdef
O-O-???
abczdef
-O-O???
zabcdef
-O-O???
abzcdef
O--O???
azbcdef
O--O???
abzcdef
?OO--??
abczdef
?OO--??
abcdzef
?-OO-??
azbcdef
?-OO-??
abcdzef
?--OO??
azbcdef
?--OO??
abzcdef
?O-O-??
abzcdef
?O-O-??
abcdzef
?-O-O??
azbcdef
?-O-O??
abczdef
?O--O??
abzcdef
?O--O??
abczdef
O??????
?O?????
ab-cdef
??z-???
O??????
?O?????
??-????
???-???
abczdef
-abcdef
zO?????
??O????
???-???
-??????
?O?????
??O????
???-???
abczdef
-abcdef
z-?????
??O????
???O???
-??????
a-bcdef
?zO????
???O???
O??????
a-bcdef
?zO????
???-???
O??????
?-?????
??O????
???-???
abczdef
-abcdef
zO?????
??-????
???O???
-??????
?O?????
ab-cdef
??zO???
O??????
a-bcdef
?z-????
???O???
O??????
?-?????
ab-cdef
??zO???
?O?????
??O????
fab-cde
???z-??
?O?????
??O????
???-???
????-??
fabczde
f-abcde
?zO????
???O???
????-??
?-?????
??O????
???O???
????-??
fabczde
f-abcde
?z-????
???O???
????O??
?-?????
fa-bcde
??zO???
????O??
?O?????
fa-bcde
??zO???
????-??
?O?????
??-????
???O???
????-??
fabczde
f-abcde
?zO????
???-???
????O??
?-?????
??O????
fab-cde
???zO??
?O?????
fa-bcde
??z-???
????O??
?O?????
??-????
fab-cde
???zO??
??O????
???O???
efab-cd
????z-?
??O????
???O???
????-??
?????-?
efabczd
ef-abcd
??zO???
????O??
?????-?
??-????
???O???
????O??
?????-?
efabczd
ef-abcd
??z-???
????O??
?????O?
??-????
efa-bcd
???zO??
?????O?
??O????
efa-bcd
???zO??
?????-?
??O????
???-???
????O??
?????-?
efabczd
ef-abcd
??zO???
????-??
?????O?
??-????
???O???
efab-cd
????zO?
??O????
efa-bcd
???z-??
?????O?
??O????
???-???
efab-cd
????zO?
???O???
????O??
defab-c
?????z-
???O???
????O??
?????-?
??????-
defabcz
def-abc
???zO??
?????O?
??????-
???-???
????O??
?????O?
??????-
defabcz
def-abc
???z-??
?????O?
??????O
???-???
defa-bc
????zO?
??????O
???O???
defa-bc
????zO?
??????-
???O???
????-??
?????O?
??????-
defabcz
def-abc
???zO??
?????-?
??????O
???-???
????O??
defab-c
?????zO
???O???
defa-bc
????z-?
??????O
???O???
????-??
defab-c
?????zO
ENDPATTERNS
RULES
z = * : a1, b1, c1, d1, e1, f1
ENDRULES
;------------------------------------------------------------------------------
; Last chance rule
;------------------------------------------------------------------------------
PATTERNS
?bca???
ENDPATTERNS
RULES
a = * : a1
b = * : b2
c = * : c3
ENDRULES
ENDFILE