com.anji.neat
Class NeuronAllele
java.lang.Object
org.jgap.Allele
com.anji.neat.NeuronAllele
- All Implemented Interfaces:
- java.lang.Comparable
- public class NeuronAllele
- extends Allele
Gene corresponding to NEAT node gene according to Evolving Neural Networks
through Augmenting Topologies
- Author:
- Philip Tucker
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NeuronAllele
public NeuronAllele(NeuronGene aNeuronGene)
- Parameters:
aNeuronGene
-
cloneAllele
public Allele cloneAllele()
- Specified by:
cloneAllele
in class Allele
- Returns:
- Gene clone of this object
- See Also:
Allele.cloneAllele()
setToRandomValue
public void setToRandomValue(java.util.Random a_numberGenerator)
- Description copied from class:
Allele
- Sets the value of this Gene to a random legal value for the implementation. This method
exists for the benefit of mutation and other operations that simply desire to randomize the
value of a gene.
- Specified by:
setToRandomValue
in class Allele
- Parameters:
a_numberGenerator
- The random number generator that should be used to create any random
values. It's important to use this generator to maintain the user's flexibility to configure
the genetic engine to use the random number generator of their choice.- See Also:
Allele.setToRandomValue(Random)
distance
public double distance(Allele aTarget)
- Specified by:
distance
in class Allele
- Parameters:
aTarget
- should be NeuronAllele
with same gene
TODO - activation type and slope
- Returns:
- positive distance between genes, where a value closer to 0 represents more similar
genes; used in computing distance between chromosomes, which in turn is used to compute
speciation compatibility.
- See Also:
Allele.distance(org.jgap.Allele)
getType
public NeuronType getType()
- Returns:
- neuron type
- See Also:
NeuronGene#getType()
isType
public boolean isType(NeuronType aType)
- Parameters:
aType
-
- Returns:
- true if
aType
matches - See Also:
NeuronGene#isType(NeuronType)
getActivationType
public ActivationFunctionType getActivationType()
- Returns:
- activation type
- See Also:
NeuronGene#getActivationType()