To obtain a set of candidates that is less restrictive than the simple binaries and more physically plausible than the random combination of elements, we now define a grammar that allows the systematic composition of strings that correspond to quaternary compositions with balanced oxidation states (see Fig. for a simplified version of the grammar). The production rules of this grammar ensure that non-terminal symbols can only be replaced by the corresponding elements or combinations of other non-terminal symbols which conserve the oxidation state (e.g. a halogen can be replaced by combining an alkali metal and a chalkogen). Furthermore, the grammar by construction only generates compositions with up to four elements. In this way, we end up with a significant screening space of ca. 1,500 systems that exclusively consist of chemically reasonable materials like Ca +2 Sr +2 Ge -4 or Li + 3 P -3 . A quantitative comparison of these approaches shows that about 30% of the grammatically generated compositions can be found on the Materials Project (MP) database, whereas the same is true for only 1% of the random compositions (see Fig. ). Moreover, for those structures found in the MP database, the mean energies above the convex hull (indicating thermodynamic (meta-)stability) are 45 and 210 meV/atom for the most stable structure corresponding to each grammatical and random composition, respectively.