An html version of knight-visits-at-least-twentysquares.cql (or 3.02 differentsquares.cql).

Created by Gady Costeff and Lewis Stiller.

CQL 5.1
; The same knight visits at least 20 squares, ; sorted by number of visited squares. ; Only unpromoted knights are considered for simplicity cql (input heijden.pgn) initial piece $knight in [Nn] sort "number of visited squares" countsquares 20 64 square $visited in any next* $knight on $visited


CQL 3.02
; Find games in which some knight has visited at least twenty different squares. ; This works by counting positions such that the knight will not again visit ; the square on which it currently sits. Squares visited by a pawn that promotes to ; a knight are not included in the count. ; (match :pgn heijden.pgn :output differentsquares.pgn :forany knight [Nn] ; loop for each possible knight (position :tagmatch knight [Nn]d4 ; Tagged piece is actually a knight on d4, not a pawn :and ; make sure this is the last such occurrence ((position :not :gappedsequence ((position) (position $knight[d4])))) :shift ; now repeat, with other squares instead of d4 :matchcount 20 65 ; match when at least 20 distinct squares found :noannotate ; do not print "MATCH" when a match is found ))

After executing this with "> cql DifferentSquares.cql" there are 12 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 4 studies are presented: