예제 #1
0
 private void lethalMutate() {
   double mutationRate =
       ModelParameters.getDouble("BASE_LETHAL_MUTATION_RATE") * getMutatorStrength();
   if (Rand.getDouble() < mutationRate) {
     die();
   }
 }
예제 #2
0
 public void mutate(int currentGeneration, ArrayList mutationProperties) {
   lethalMutate();
   if (isAlive()) {
     deleteriousMutate(currentGeneration, mutationProperties);
     beneficialMutate(currentGeneration, mutationProperties);
     mutatorMutate(currentGeneration);
     antimutatorMutate(currentGeneration);
   }
   if (getFitness() <= 0) {
     die();
   }
 }