org.encog.ml.ea.opp
Interface EvolutionaryOperator
-
- All Known Implementing Classes:
- CompoundOperator, ConstMutation, MutatePerturb, MutateShuffle, NEATCrossover, NEATMutateAddLink, NEATMutateAddNode, NEATMutateRemoveLink, NEATMutateWeights, NEATMutation, Splice, SpliceNoRepeat, SubtreeCrossover, SubtreeMutation
public interface EvolutionaryOperatorAn evolutionary operator is used to create new offspring genomes based on parent genomes. There are a variety of means by which this can be done. The number of parents required, as well as the number of offspring produced are dependent on the operator. This interface defines key characteristics that all operators must share. Most operators do not modify the parents. However, some mutation operators do require that the children and parent array be the same. If the children and parent arrays are the same, then the parent will be mutated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidinit(EvolutionaryAlgorithm theOwner)Called to setup the evolutionary operator.intoffspringProduced()intparentsNeeded()voidperformOperation(java.util.Random rnd, Genome[] parents, int parentIndex, Genome[] offspring, int offspringIndex)Perform the evolutionary operation.
-
-
-
Method Detail
-
init
void init(EvolutionaryAlgorithm theOwner)
Called to setup the evolutionary operator.- Parameters:
theOwner- The evolutionary algorithm used with this operator.
-
offspringProduced
int offspringProduced()
- Returns:
- The number of offspring produced by this type of crossover.
-
parentsNeeded
int parentsNeeded()
- Returns:
- The number of parents needed.
-
performOperation
void performOperation(java.util.Random rnd, Genome[] parents, int parentIndex, Genome[] offspring, int offspringIndex)Perform the evolutionary operation.- Parameters:
rnd- A random number generator.parents- The parents.parentIndex- The index into the parents array.offspring- The offspring.offspringIndex- An index into the offspring array.
-
-
DMelt 3.0 © DataMelt by jWork.ORG