Package org.jgap.impl

Examples of org.jgap.impl.DefaultConfiguration


  private Configuration constructConfiguration(final int threadIndex, final EcEvolver myFunc)
      throws InvalidConfigurationException
  {
    DefaultConfiguration.reset(threadIndex + " thread.");
    final Configuration conf = new DefaultConfiguration(threadIndex + " thread.", threadIndex + " thread.");
    conf.setFitnessFunction(myFunc);
    conf.addGeneticOperator(EcGeneticUtil.getCleansingOperator(this));
    conf.addGeneticOperator(EcGeneticUtil.getOverlordingOperator(this, requiredActions));
    conf.addGeneticOperator(EcGeneticUtil.getInsertionOperator(this));
    conf.addGeneticOperator(EcGeneticUtil.getDeletionOperator(this));
    conf.addGeneticOperator(EcGeneticUtil.getTwiddleOperator(this));
    conf.addGeneticOperator(EcGeneticUtil.getSwapOperator(this));
    conf.setPopulationSize(POPULATION_SIZE);
    conf.setSelectFromPrevGen(1);
    conf.setPreservFittestIndividual(false);
    conf.setAlwaysCaculateFitness(false);
    conf.setKeepPopulationSizeConstant(false);
    Gene[] initialGenes = importInitialGenes(conf);
    Chromosome c = new Chromosome(conf, initialGenes);
    conf.setSampleChromosome(c);
    return conf;
  }
View Full Code Here


       
        }
       
    @Override
        protected void setup() throws InvalidConfigurationException{
                gaConf = new DefaultConfiguration();
    gaConf.setPreservFittestIndividual(true);

               
    GeneFactory gf = new GeneFactory(geneType, in.getSize());
   
View Full Code Here

  public RandomMutationHillClimbingSearch() {
  }

  public ArrayList<Gene> newIndividual() throws InvalidConfigurationException {
    Configuration gaConf = new DefaultConfiguration();
   
    GeneFactory gf = new GeneFactory(geneType, in.getSize());
   
    ArrayList<Gene> a_individual = new ArrayList<Gene>();
   
View Full Code Here

TOP

Related Classes of org.jgap.impl.DefaultConfiguration

Copyright © 2018 www.massapicom. 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.