@Override protected void createParents() { parents = new ArrayList<IIndividual>(); // Parent genotype ExprTree genotype = new ExprTree(); genotype.addBlock(new Add()); genotype.addBlock(new X()); genotype.addBlock(new Sub()); genotype.addBlock(new Mul()); genotype.addBlock(new Y()); genotype.addBlock(new Z()); genotype.addBlock(new X()); // Add individual to the parents set parents.add(new ExprTreeIndividual(genotype)); }
@Override protected void createExpected() { expected = new ArrayList<IIndividual>(); // Mutated individual genotype ExprTree genotype = new ExprTree(); genotype.addBlock(new Add()); genotype.addBlock(new X()); genotype.addBlock(new Add()); genotype.addBlock(new Sub()); genotype.addBlock(new X()); genotype.addBlock(new Y()); genotype.addBlock(new Z()); // Add individual to expected set expected.add(new ExprTreeIndividual(genotype)); }