Greetings,
I'm starting with DEAP and I need to create an individual of 2 trees with different sets. Each tree controls cooperative agents with different roles in a simulation. They are evaluated together.
How can I achieve that?
After some research, I came up with the following.
Given agent1_set and agent2_set:
creator.create("FitnessMax", base.Fitness, weights=(1,))
creator.create("Individual", tuple, fitness=creator.FitnessMax)
toolbox.register("agent1_tree", gp.genHalfAndHalf, pset=agent1_set, min_=5, max_=10)
toolbox.register("agent2_tree", gp.genHalfAndHalf, pset=agent2_set, min_=10, max_=20)
Now I'm not sure how to initialize them as an Individual.
For evaluation and recombination, I know that I just need to wrap the functions, since the first tree doesn't recombine with the second one.
Any help is appreciated,