questions about config class

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

questions about config class

Arturo Veras
i need help with some conditions that i need.

i have 3 genes, placement with r*c genes, wattage with 2*r*c genes and height with 2*r*c genes.

the 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[3];
        sampleGenes[0] = new FixedBinaryGene(conf, r * c); //placement
        sampleGenes[1] = new FixedBinaryGene(conf, 2 * r * c); // wattage
        sampleGenes[2] = new FixedBinaryGene(conf, 2 * r * c); // height



--
Atte.
Arturo

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users