com.anji.neat
Class ConnectionAllele
java.lang.Object
org.jgap.Allele
com.anji.neat.ConnectionAllele
- All Implemented Interfaces:
- java.lang.Comparable
public class ConnectionAllele
- extends Allele
Gene corresponding to NEAT connection 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 |
DEFAULT_WEIGHT
public static final double DEFAULT_WEIGHT
- default connection weight
- See Also:
- Constant Field Values
ConnectionAllele
public ConnectionAllele(ConnectionGene aConnectionGene)
- Parameters:
aConnectionGene -
toString
public java.lang.String toString()
- Overrides:
toString in class Allele
- See Also:
Object.toString()
cloneAllele
public Allele cloneAllele()
- Specified by:
cloneAllele in class Allele
- Returns:
- Gene clone of this object
- See Also:
Allele.cloneAllele()
distance
public double distance(Allele target)
- Specified by:
distance in class Allele
- Parameters:
target - should be ConnectionAllele with same gene
- Returns:
double compatibility distance based on weight; always positive- See Also:
Allele.distance(Allele)
setToRandomValue
public void setToRandomValue(java.util.Random a_numberGenerator)
- set weight to random value distributed uniformly between
MIN_INIT_WEIGHT and
MAX_INIT_WEIGHT
- Specified by:
setToRandomValue in class Allele
- Parameters:
a_numberGenerator -
getWeight
public double getWeight()
- Returns:
- connection weight
setWeight
public void setWeight(double aWeight)
- Parameters:
aWeight - new connection weight
getSrcNeuronId
public java.lang.Long getSrcNeuronId()
- Returns:
- src neuron ID
- See Also:
ConnectionGene.getSrcNeuronId()
getDestNeuronId
public java.lang.Long getDestNeuronId()
- Returns:
- dest neuron ID
- See Also:
ConnectionGene.getDestNeuronId()