Examples of IChromosome


Examples of org.jgap.IChromosome

      {
        Collections.shuffle(conf.getGeneticOperators());
        BASE_MUTATION_RATE += .001;
        if (BASE_MUTATION_RATE >= (double) CHROMOSOME_LENGTH / 2.0 )
          BASE_MUTATION_RATE = 1;
        IChromosome fittestChromosome = population.getFittestChromosome();
        if (killThreads)
        {
          threads.remove(thread);
          thread.interrupt();
        }
        double fitnessValue = fittestChromosome.getFitnessValue();
        if (fitnessValue > bestScores[threadIndex])
        {
          bestScores[threadIndex] = fitnessValue;
          evolutionsSinceDiscovery[threadIndex] = 0;
          BASE_MUTATION_RATE = 1;
View Full Code Here

Examples of org.jgap.IChromosome

    gaConf.setPreservFittestIndividual(true);

               
    GeneFactory gf = new GeneFactory(geneType, in.getSize());
   
    IChromosome sampleChromosome = new Chromosome(gaConf, gf.getInstance(gaConf),
          chromesize);
   
               
    gaConf.setSampleChromosome(sampleChromosome);
    gaConf.setPopulationSize(popsize);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.