CQL Introduction

Chess Query Language (CQL) was designed to allow researchers, authors, and players to search for games, problems, and studies that match specific themes.

You specify the theme you are looking for, and the database to look for them, in CQL. Then you run this CQL file using cql.exe . This creates a new PGN file that has all the games matching your theme.

CQL specifies a small but powerful set of primitives to define chess themes. CQL can find much more complex themes than any other chess program. Users have searched for themes like stalemates with multiple pins; games in which the same position recurs but with the winning side missing just one piece; Nowotny and Grimshaw themes, games with some number of captures on a single square, games with a certain number of black and white passed pawns, and many more.

Questions or comments about CQL should be directed to rbnn@rbnn.com . Feel free to ask for code to build themes you are interested in.

Two references for good introductions to CQL are:

  1. The article by Tim Krabbé in his Open Chess Diary.
  2. Gady Costeff's article in EG #151. Copies of the excellent magazine EG may be ordered by emailing Harm Benak (hbenak at domain tiscali.nl )

Credits

CQL was developed by Gady Costeff and Lewis Stiller. It is Copyright (c) 2003-2004 and is free. It also uses Scid code by Shane Hudson. The Windows build uses the Cygwin Libraries.