An html version of knightchase.cql.

Created by Gady Costeff and Lewis Stiller.

CQL 5.1
; a pair of knights chase other around the board
; output sorted by length cql(input heijden.pgn) piece $chaser in n piece $chased in N not previous ( any move from $chased move from $chaser to attacks ($chased any) ) sort "chase length" next 6 100 ( (move from $chaser to attacks ($chased any) move from $chased)+ )

CQL 3.2
;Search for positions in which a knight chases a knight of another color, continually offering to sacrifice itself (match :pgn heijden.pgn :output knightchase.pgn :forany chaser [nN] ; this is the chasing knight :forany chasee [Nn] ; this is the chased knight (position :tagmatch chaser n ; make sure the chaser is really a black knight, ;not a N or a pawn that will promote to one :tagmatch chasee N ; make sure the chasee is really a white knight, ; and not a n or a pawn that will promote to one :sequence ((position :wtm :attackcount $chaser $chasee 1 :movefrom $chasee) (position :movefrom $chaser) (position :attackcount $chaser $chasee 1)) :matchcount 4 100 :flipcolor ))

After executing this with "> cql KnightChase.cql" there are 23 studies found in the Harold van der Heijden Database V 2015.
NB. When you see {MATCH} in the text, it means that cql has found the position asked for.

Below only 5 studies are presented: