Class WeaselProgram<G extends Gene<?,​G>,​C extends Comparable<? super C>>

  • Type Parameters:
    G - the gene type
    C - the fitness result type
    All Implemented Interfaces:
    Engine.Setup<G,​C>

    public final class WeaselProgram<G extends Gene<?,​G>,​C extends Comparable<? super C>>
    extends Object
    implements Engine.Setup<G,​C>
    Configures the evolution engine to execute the Weasel program algorithm.
    final Engine<CharacterGene, Integer> engine = Engine.builder(problem) .setup(new WeaselProgram<>()) .build();
    Since:
    6.0
    Version:
    6.0
    See Also:
    WeaselSelector, WeaselMutator
    • Constructor Detail

      • WeaselProgram

        public WeaselProgram​(double mutationProbability)
        Create a new weasel program setup with the give mutation probability.
        Parameters:
        mutationProbability - the mutation probability
        Throws:
        IllegalArgumentException - if the mutationProbability is not in the valid range of [0, 1].
      • WeaselProgram

        public WeaselProgram()
        Create a new weasel program setup with the default mutation probability of 0.05.