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