protected int evaluate( Chromosome genotype, Activator substrate, int evalThreadIndex, NiceWriter logOutput) { TargetFitnessCalculator.Results results = fitnessCalculator.evaluate( substrate, inputPatterns, targetOutputPatterns, minTargetOutputValue, maxTargetOutputValue, logOutput); genotype.setPerformanceValue(results.performance); return results.fitness; }
/** * Sets the maximum possible fitness value this function will return. Default is 1000000 which is * fine for nearly all purposes. * * @param newMaxFitnessValue The new maximum fitness. */ protected void setMaxFitnessValue(int newMaxFitnessValue) { fitnessCalculator.setMaxFitnessValue(newMaxFitnessValue); }
/** @return maximum possible fitness value for this function. */ public int getMaxFitnessValue() { return fitnessCalculator.getMaxFitnessValue(); }