The CARLsim-ECJ ecjapp package is a small layer of Java code that extends the ECJ evolutionary computation framework to launch an external simulation that evaluates the phenotype of multiple individuals (a subset of a population) simultaneously. This is particularly useful for highly parallel, GPU-based simulations, where we gain by evaluating more than one individual per invocation of the simulator.

Broadly speaking, ECJ and ecjapp handle the evolutionary algorithm and the phenotype-to-fitness mapping, while the genotype-to-phenotype mapping is performed by the external simulator. The public components of ecjapp are summarized in the following UML diagram. The package hierarchy mirrors the hierarchy used to define the corresponding ECJ parameters.

{@link ecjapp.eval.SimpleGroupedEvaluator} is a modified version of ECJ's SimpleEvaluator that splits the population into groups, each of which will be evaluated by a single external simulation call. ECJ parameter files are used to specify the number of individuals per group and the external shell command that {@link ecjapp.eval.problem.CommandController} will use to launch the simulator. The simulator must accept a set of genomes in CSV format on stdin, and it must output the simulation result (phenotypes) to stdout in CSV format. Typically this means that an experiment-specific script or executable is called, rather than the actual simulator, to translate the genetic representation into simulation parameters. The user must also provide an experiment-specific {@link ecjapp.eval.problem.objective.ObjectiveFunction}, which decodes the results and uses them to compute a SimpleFitness for each individual.