CQL: The Chess Query LanguageChess Query Language (CQL) searches for user-defined patterns and themes in chess games and studies. It is designed to be compact and efficient.
In CQL, you can search for basic things like certain pieces being on certain ranges of squares; players with particular names or Elo ratings; whether a side is in check or mate; the year, event, or site of a game; and so on.
But with CQL, you can find also find studies and games that express themes that cannot be found with other tools. Some of the things you can do with CQL are:
- Find queen staircase maneuvers, in which the queen moves in a staircase-like pattern. Sort the results by the length of the staircase.
- Find zugzwang studies. where the common move sequence between the try and the solution is at least 15 moves. You can also sort these studies by the length of the common move sequence.
- Find more other problem themes, like Turtons or Bristols or delayed clearances or Wurzburg-Plachuttas.
- You can combine ideas in any ways you want. You can search for themes shifted horizontally, vertically or in any direction. You can combine themes with and operators, or operators, not operators, or sequencing operators.
- sort games or studies in many ways, such as:
CQL may be downloaded here. Any questions or comments about CQL should be directed to
costeff at the domain
Two references for good introductions to previous versions of CQL are:
CQL was developed by Gady Costeff and Lewis Stiller. It is copyright (c) 2003-2017 and is free. It uses SCID code by Shane Hudson to parse the PGN files.