org.encog.neural.networks.training.neat
Class NEATLinkGene

java.lang.Object
  extended by org.encog.solve.genetic.genes.BasicGene
      extended by org.encog.neural.networks.training.neat.NEATLinkGene
All Implemented Interfaces:
Comparable<Gene>, Gene

public class NEATLinkGene
extends BasicGene

Implements a NEAT link gene. This describes a way in which two neurons are linked. NeuroEvolution of Augmenting Topologies (NEAT) is a genetic algorithm for the generation of evolving artificial neural networks. It was developed by Ken Stanley while at The University of Texas at Austin. http://www.cs.ucf.edu/~kstanley/


Constructor Summary
NEATLinkGene()
          Default constructor, used mainly for persistence.
NEATLinkGene(long fromNeuronID, long toNeuronID, boolean enabled, long innovationID, double weight, boolean recurrent)
          Construct a NEAT link gene.
 
Method Summary
 void copy(Gene gene)
          Copy from another gene.
 long getFromNeuronID()
           
 long getToNeuronID()
           
 double getWeight()
           
 boolean isRecurrent()
           
 void setWeight(double weight)
          Set the weight of this connection.
 String toString()
          
 
Methods inherited from class org.encog.solve.genetic.genes.BasicGene
compareTo, getId, getInnovationId, isEnabled, setEnabled, setId, setInnovationId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NEATLinkGene

public NEATLinkGene()
Default constructor, used mainly for persistence.


NEATLinkGene

public NEATLinkGene(long fromNeuronID,
                    long toNeuronID,
                    boolean enabled,
                    long innovationID,
                    double weight,
                    boolean recurrent)
Construct a NEAT link gene.

Parameters:
fromNeuronID - The source neuron.
toNeuronID - The target neuron.
enabled - Is this link enabled.
innovationID - The innovation id.
weight - The weight.
recurrent - Is this a recurrent link?
Method Detail

copy

public void copy(Gene gene)
Copy from another gene.

Parameters:
gene - The other gene.

getFromNeuronID

public long getFromNeuronID()
Returns:
The from neuron id.

getToNeuronID

public long getToNeuronID()
Returns:
The to neuron id.

getWeight

public double getWeight()
Returns:
The weight of this connection.

isRecurrent

public boolean isRecurrent()
Returns:
True if this is a recurrent link.

setWeight

public void setWeight(double weight)
Set the weight of this connection.

Parameters:
weight - The connection weight.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.