jaga.evolve
Class BitMutator
java.lang.Object
|
+--jaga.evolve.BitMutator
- All Implemented Interfaces:
- GeneticOperator, java.io.Serializable
- public class BitMutator
- extends java.lang.Object
- implements GeneticOperator
Flips bit in the genotype according to a probabilty.
This also performs reproduction when mutation probability is low.
Works with variable length genotypes.
- See Also:
- Serialized Form
Constructor Summary |
BitMutator(double bitMutationProb)
|
Method Summary |
void |
operate(Selector selector,
Population oldPopulation,
Population newPopulation,
int howMany)
method that adds genotypes to the new population by extracting some
from the old one and manipulating them in some way. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BitMutator
public BitMutator(double bitMutationProb)
operate
public void operate(Selector selector,
Population oldPopulation,
Population newPopulation,
int howMany)
- method that adds genotypes to the new population by extracting some
from the old one and manipulating them in some way.
- Specified by:
operate
in interface GeneticOperator
- Parameters:
oldPopulation
- in parameter having all the original genotypesnewPopulation
- in/out parameter where the next generation of genotypes is being builthowMany
- how many new genotypes to add to the new population
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object