randomInitialGenotype function and a specific random function to geenerate a population

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

randomInitialGenotype function and a specific random function to geenerate a population

djanahana
Good morning

i have please a small question about "randomInitialGenotype" function ,

i am using a population with CompositeGene ,i would like to generate my initail population according to a specific random_function

i have CompositeGne that contain 20 Genes,and i want that those Gene took a value in  [0-7].

i  had write the function that generate a CompositeGene that way ,but when i  

       Gene[] sampleGenes = createCompositeGenes(conf,7);//

    IChromosome sampleChromosome = new Chromosome(conf, sampleGenes);
    
   conf.setSampleChromosome(sampleChromosome);

  Genotype population = Genotype.randomInitialGenotype(conf);


but when i generate the population i found either Gene's value that is more then 7 (8,15,...)

i wich i could find the answer for this question

Thanks for reading my message

Best regards

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users