piece/square configurations
CQL supports a number of filters to search for patterns of squares and pieces in a specific position. These filters only consider the arrangement of pieces or squares: they do not consider side-to-move, next move, or any other dynamic features of a position. In the table below, click on the name of a filter for more detailed information:
filter name | example | description |
---|---|---|
. | . |
a-h1-8 , i.e. any square |
attack | attack (R K) |
first argument attacks second argument |
between | between (R K) |
squares between its arguments |
check | check |
one side is in check |
countsquares | countsquares 3 8 Q |
number of squares in its argument is within range |
darksquares | darksquares |
dark squares |
directional filters | right 1 Q |
squares in specified direction in specified distance |
lightsquares | lightsquares |
lightsquares |
mate | check |
one side is mated |
piece designators | Na3 [RQ]a-h2-3 |
designated pieces on designated squares |
power | power 15 100 A |
material of argument is in range |
powerdifference | powerdifference 15 100 (A a) |
difference in material of arguments is in range |
ray | ray (Q a k) |
specified arguments arranged in ordered line segment without interference |
stalemate | stalemate |
one side in stalemate |