Пример #1
0
 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;
 }
Пример #2
0
 /**
  * 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);
 }
Пример #3
0
 /** @return maximum possible fitness value for this function. */
 public int getMaxFitnessValue() {
   return fitnessCalculator.getMaxFitnessValue();
 }