i have 3 genes, placement with r*c genes, wattage with 2*r*c genes and height with 2*r*c genes.
individuals that will form the parents of the next generation are
selected with probability proportional to their fitness value.
one-point cross over, the point must be between two genes, placement and wattage.
this is my configuration class. i think this is correct but I'm not sure.
GPConfiguration conf = new GPConfiguration(); conf.setSelectionMethod((INaturalGPSelector) new WeightedRouletteSelector()); conf.setFitnessEvaluator(new DefaultFitnessEvaluator()); //a higher fitness value is seen as fitter conf.setPreservFittestIndividual(true); Fitness myFunc = new Fitness(); conf.setFitnessFunction(myFunc); conf.setMaxCrossoverDepth(r*c); conf.setCrossoverProb(0.2f); conf.setMutationProb(0.0075f); Gene sampleGenes = new Gene; sampleGenes = new FixedBinaryGene(conf, r * c); //placement sampleGenes = new FixedBinaryGene(conf, 2 * r * c); // wattage sampleGenes = new FixedBinaryGene(conf, 2 * r * c); // height