I was looking through the sources of epochX and wondering how the
"strongly-typed" feature of the a GP is ensured during crossover.
Within the UniformPointCrossover class the swap points in both parent
programs are determined via the RNG, then both subtrees are exchanged,
but I see no check for the type of the nodes to swap here (either
Void, Boolean, or Double).
Then I have looked into the CrossoverManager class, where both parents
for crossover are selected. I can see there that all produced children
are checked via the allValid() method, which in turn calls the
isValid() method of both candidate programs. But, within this method
of the GPCandidateProgram class, only the max depth is checked, not
any of the nodes and their types.
So, do I have missed anything here? Shouldn't the types of the nodes
to be swapped be checked, so that for example a child node of the
IfFunction will not be swapped to a Float-typed node during crossover?
Thanks for your clarification :)
Cheers, Matthias