An html version of zwickmuhle.cql
; zwickmuhle.cql can be downloaded here.
;This looks for Zwickmuhle's with bishop and knight. Specifically, we
;are looking for positions where a minor piece moves to a square,
;giving check, and then later moves from the square, giving orthogonal
;check from a rook or queen, and then again from the square giving
;check. This illustrates the use of multiple positions inside a match
;list to help increase efficiency. Games not matching the first
;position will not have to run through the much more complex second
;position.
(match
:pgn mega.pgn
:gamenumber 1 3000
:output out.pgn
(position :matchcount 2 1000
:flipcolor
:noannotate
:sequence
((position :movefrom [BN] )
(position :check :movefrom k)
))
(position
:flipcolor
:shift
:and (
(position :sequence
(
(position :movefrom [BN] :moveto ?c6)
(position :check :movefrom k)))
(position :gappedsequence
(
(position :sequence
((position :movefrom [BN]c6)
(position :check :rayorthogonal ([RQ] . k) :movefrom k)
)
)
(position :sequence
((position :movefrom [BN] :moveto ?c6)
(position :check :movefrom k)
)
)
)
)
)
)
)