light

The light filter takes a single set filter as argument. It has as value the set of light squares that are in the set of squares represented by that argument.

Thus, to find positions with more than one light-squared white bishop, use

  light >1

Examples

The light filter is used in chameleon.cql (see the dark documentation for discussion of its use there).

The CQL code in allsamecolor.cql can be used to find positions in which all the pieces (at least 10) are on the same color square, as here:

A. Troitzky 1910
(found from CQL file: allsamecolor.cql)

The line

      light  == 

is used to check that the set of light pieces is equal to the set of pieces, which is the same as saying that all pieces are on light squares. The preceding this turns it into

        light  ==  or
        dark   == 

because when the board is reflected, light squares turn into dark squares. The filter as a whole thus matches a position in which all pieces are on the same color squares.