An html version of idealmirrormate.cql.
Created by Gady Costeff and Lewis Stiller.
CQL 5.1 example can be found at the website of GadyCosteff.
CQL 3.02
;;This finds all ideal mirror mates: studies in which the Black King is surrounded by empty squares, is attacked once, ;;such that if the Black King were to move to one of its neighbors, it would be attacked exactly once. ;;This also finds positions in the variations, since there turn out to be Bishop mates only the variations. (match :pgn heijden.pgn :output idealmirrormate.pgn (position :and ;; the mating position must match each criterion below: ( (position ; The king is surrounded by empty squares and is attacked once and is in mate :attackcount k . 8 :attackcount A k 1 ; :attackcount N k 0 :mate :btm) ;; Check that no neighbor of the black king is attacked more than once (position :not :attackcount k .e4 1 :attackcount A .e4 2 100 :shift ) ;; The next two clauses remove certain pathological cases let in by the above clauses. They can be removed ;; if desired, and one will find a few spurious hits ;; Check that there is no rook attacking the Black king, such that the black king would still ;; be attacked by the rook if it went to an empty square, e.g., Ra3, kd3, Qe8 (position :not :attackcount k .e4 1 :attackcount A .e4 1 :rayorthogonal ([QR] k .e4) :shift ) ;; Same as above, but for diagonal moving pieces (position :not :attackcount A .e4 1 :attackcount k .e4 1 :raydiagonal ([QB] k .e4) :shift ) ) ;; Look in the variations, since otherwise you will not find any ideal mates with a bishop. :variations ) )
After executing this with "> cql IdealMirrorMate.cql" there are 78 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: