Exemple #1
0
  private void antimutatorMutate(int currentGeneration) {
    int startingEvolvingGeneration = ModelParameters.getInt("START_EVOLVING_GENERATION");
    double mutationRate = ModelParameters.getDouble("INITIAL_ANTIMUTATOR_MUTATION_RATE");

    if (currentGeneration >= startingEvolvingGeneration) {
      mutationRate =
          ModelParameters.getDouble("EVOLVING_ANTIMUTATOR_MUTATION_RATE") * getMutatorStrength();
    }

    //        Poisson poisson = new Poisson(mutationRate, Rand.getEngine());
    //        int poissonObs = poisson.nextInt();
    int poissonObs = Util.getPoisson(mutationRate);
    for (int nMutation = 0; nMutation < poissonObs; nMutation++) {
      MutatorLocus locus = getRandomMutatorLocus();
      locus.decreaseStrength();
    }
  }