I'm working on a project in which we want to make evolution persistent. We are using the GP packages and would like to be able to introduce new CommandGenes to the GPGenotype at runtime. Our idea for implementation is the following:
- Dump new CommandGenes (their .class files) into a directory
- Serialize the current population
- Create a new GPGenotype with all the CommandGenes in the above directory in the nodeSet (creating new instances with ClassLoader.
- Deserialize the population and set the new GPGenotype's population to the deserialized one.
- call GPGenotype.evolve()
I realize setGPPopulation is protected in GPGenotype and subclassed it. However, I ran into issues when running evolve. There is no way to set GPGenotype.fullModeAllowed[]. This caused a null pointer when adding individuals to the new generation.
Is there currently a way to do what I've stated? Do I need to alter GPGenotype in order to do this?
Thanks in advance.