Class ProgramRandomMutateMutator

java.lang.Object
net.bmahe.genetics4j.gp.mutation.ProgramRandomMutateMutator
All Implemented Interfaces:
Mutator

public class ProgramRandomMutateMutator extends Object implements Mutator
  • Field Details

    • logger

      public static final org.apache.logging.log4j.Logger logger
    • programGenerator

      private final ProgramGenerator programGenerator
    • randomGenerator

      private final RandomGenerator randomGenerator
    • eaConfiguration

      private final AbstractEAConfiguration eaConfiguration
    • populationMutationProbability

      private final double populationMutationProbability
  • Constructor Details

  • Method Details

    • duplicateAndMutate

      protected TreeNode<Operation<?>> duplicateAndMutate(Program program, TreeNode<Operation<?>> root, int cutPoint, int nodeIndex, int currentDepth)
    • mutate

      public Genotype mutate(Genotype originalGenotype)
      Description copied from interface: Mutator
      Applies mutation to the given genotype and returns a new mutated genotype.

      The original genotype should not be modified; instead, a new genotype with the mutations applied should be returned. The specific mutation behavior depends on the implementation and the mutation policy being used.

      Mutation may affect:

      • Individual alleles within chromosomes (bit flips, value changes)
      • Chromosome structure (for variable-length representations)
      • Multiple chromosomes simultaneously
      Specified by:
      mutate in interface Mutator
      Parameters:
      originalGenotype - the genotype to mutate, must not be null
      Returns:
      a new genotype with mutations applied, never null