By using appropriate terminals, functions and/or interpreters, GP can go beyond the production of computer programs. In cellular encoding (Gruau, 1994; Gruau and Whitley, 1993; Gruau, 1994), programs are interpreted as sequences of instructions which modify (grow) a simple initial structure (embryo). Figure 6.4 shows part of the development of an electronic circuit.3 Once the program has finished, the quality of the structure it has produced is measured and this is taken to be the fitness of the program.
Naturally, for cellular encoding to work the primitives of the language must be able to grow structures appropriate to the problem domain. Typical instructions involve the insertion and/or sizing of components, topological modifications of the structure, etc. Cellular encoding GP has successfully been used to evolve neural networks (Gruau, 1994; Gruau and Whitley, 1993; Gruau, 1994) and electronic circuits (Koza et al., 1999; Koza, Andre, Bennett, and Keane, 1996a; Koza, Bennett, Andre, and Keane, 1996c), as well as in numerous other domains. A related approach proposed by Hoang, Essam, McKay, and Nguyen (2007) combines tree adjoining grammars (Section 6.2.3 ) with L-systems (Lindenmayer, 1968) to create a system where each stage in the developmental process is a working program that respects the grammatical constraints.
One of the advantages of indirect representations such as cellular encoding is that the standard GP operators can be used to evolve structures (such as circuits) which may have nothing in common with standard GP trees. In many of these systems, the structures being "grown" are also still meaningful (and evaluable) at each point in their development. This allows fitness evaluation. Another important advantage is that structures resulting from developmental processes often have some regularity, which other methods obtain through the use of ADFs, constraints, types, etc. A disadvantage is that, with cellular encoding, individuals require an additional genotype-to-phenotype decoding step. However, when the fitness function involves complex calculations with many fitness cases, the relative cost of the decoding step is often small compared with the rest of the fitness function.