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;
}