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
 

Constructor Detail

BitMutator

public BitMutator(double bitMutationProb)
Method Detail

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 genotypes
newPopulation - in/out parameter where the next generation of genotypes is being built
howMany - how many new genotypes to add to the new population

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object