The ECJ manual gives the following rationale for multiple GP trees:

ECJ allows multiple subtrees for various experimental needs: Automatically Defined Functions (ADFs — a mechanism for evolving subroutine calls), or parallel program execution, or evolving teams of programs.

I don't know about your crossover question, though, so I'll leave that to someone else...


On Tue, May 23, 2017 at 11:18 AM, Xiaomeng Ye <[log in to unmask]> wrote:
Hello all,

I am curious about the reasoning behind having multiple GP trees under one GP individual. In the code, GPIndividual is defined as:

public class GPIndividual extends Individual
    public GPTree[] trees;

It seems the tutorials normally have one tree under one individual. I wonder what are the usages of having multiple trees under one individual. 
I read the code in, it seems that when one individual has multiple trees, one tree is selected randomly for the crossover. I understand this can be customized to a different version. For example, tree1 of individual A can only be crossed with tree1 of individual B.

Additionally, if we have multiple trees under one individual, do we need to change the parameter file so the crossover happen normally? (To me the answer is no, but I am not sure.) Say if I use the following as my parameter when there is only one tree under one individual:

pop.subpop.0.species.pipe = ec.breed.MultiBreedingPipeline
# Koza's decision here was odd...
pop.subpop.0.species.pipe.generate-max = false
# Subsidiary pipelines:
pop.subpop.0.species.pipe.num-sources = 2
pop.subpop.0.species.pipe.source.0 =
pop.subpop.0.species.pipe.source.0.prob = 0.9
pop.subpop.0.species.pipe.source.1 = ec.breed.ReproductionPipeline
pop.subpop.0.species.pipe.source.1.prob = 0.1

Thank you very much!

Ye Xiaomeng


Ph.D student in Computer Science, George Mason University
CFO and Web Director, Journal of Mason Graduate Research