I'm using the org.encog.ml.ea.train.basic.TrainEA class to implement a genetic algorithm. The Genome is a DoubleArrayGenome and one of the Operations is MutatePerturb. When iterating I get NullPointerExceptions in the second generation. I tracked this down to the fact that MutatePerturb is accessing the population to access the GenomeFactory. This fails, because The Factory calls the constructor of DoubleArrayGenome (same for IntegerArrayGenome) which only clones the Data, but does not set the population.
I'm using the org.encog.ml.ea.train.basic.TrainEA class to implement a genetic algorithm. The Genome is a DoubleArrayGenome and one of the Operations is MutatePerturb. When iterating I get NullPointerExceptions in the second generation. I tracked this down to the fact that MutatePerturb is accessing the population to access the GenomeFactory. This fails, because The Factory calls the constructor of DoubleArrayGenome (same for IntegerArrayGenome) which only clones the Data, but does not set the population.