public class WeaselMutator<G extends Gene<?,G>,C extends Comparable<? super C>> extends Mutator<G,C>
The mutator mutates the genes of every chromosome of every genotype in the population with the given mutation probability.
Engine setup for the Weasel program:
 
 final Engine<CharacterGene, Integer> engine = Engine
     .builder(fitness, gtf)
      // Set the 'WeaselSelector'.
     .selector(new WeaselSelector<>())
      // Disable survivors selector.
     .offspringFraction(1)
      // Set the 'WeaselMutator'.
     .alterers(new WeaselMutator<>(0.05))
     .build();WeaselSelector_probabilityDEFAULT_ALTER_PROBABILITY| Constructor and Description | 
|---|
| WeaselMutator() | 
| WeaselMutator(double probability) | 
| Modifier and Type | Method and Description | 
|---|---|
| AltererResult<G,C> | alter(Seq<Phenotype<G,C>> population,
     long generation) | 
| boolean | equals(Object obj) | 
| int | hashCode() | 
| protected MutatorResult<Genotype<G>> | mutate(Genotype<G> genotype,
      double p,
      Random random) | 
| String | toString() | 
getProbabilitypublic WeaselMutator(double probability)
public WeaselMutator()
public int hashCode()
hashCode in class AbstractAlterer<G extends Gene<?,G>,C extends Comparable<? super C>>public boolean equals(Object obj)
equals in class AbstractAlterer<G extends Gene<?,G>,C extends Comparable<? super C>>© 2007-2018 Franz Wilhelmstötter (2018-10-28 17:23)