public class NEATCrossover extends java.lang.Object implements EvolutionaryOperator, java.io.Serializable
| Constructor and Description |
|---|
NEATCrossover() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNeuronID(long nodeID,
java.util.List<NEATNeuronGene> vec,
NEATGenome best,
NEATGenome notBest)
Add a neuron.
|
void |
init(EvolutionaryAlgorithm theOwner)
Init this operator.
|
int |
offspringProduced() |
int |
parentsNeeded() |
void |
performOperation(java.util.Random rnd,
Genome[] parents,
int parentIndex,
Genome[] offspring,
int offspringIndex)
Perform the evolutionary operation.
|
public void addNeuronID(long nodeID,
java.util.List<NEATNeuronGene> vec,
NEATGenome best,
NEATGenome notBest)
nodeID - The ID.vec - The list of ID's used.best - The best node.notBest - Not the best node.public void init(EvolutionaryAlgorithm theOwner)
init in interface EvolutionaryOperatortheOwner - The evolutionary algorithm used with this operator.public int offspringProduced()
offspringProduced in interface EvolutionaryOperatorpublic int parentsNeeded()
parentsNeeded in interface EvolutionaryOperatorpublic void performOperation(java.util.Random rnd,
Genome[] parents,
int parentIndex,
Genome[] offspring,
int offspringIndex)
performOperation in interface EvolutionaryOperatorrnd - A random number generator.parents - The parents.parentIndex - The index into the parents array.offspring - The offspring.offspringIndex - An index into the offspring array.