NEATGenome
org.encog.neural.neat.training

Class NEATGenome

  • All Implemented Interfaces:
    Serializable, Cloneable, Genome, MLMethod
    Direct Known Subclasses:
    HyperNEATGenome


    public class NEATGenomeextends BasicGenomeimplements Cloneable, Serializable
    Implements a NEAT genome. This is a "blueprint" for creating a neural network. ----------------------------------------------------------------------------- http://www.cs.ucf.edu/~kstanley/ Encog's NEAT implementation was drawn from the following three Journal Articles. For more complete BibTeX sources, see NEATNetwork.java. Evolving Neural Networks Through Augmenting Topologies Generating Large-Scale Neural Networks Through Discovering Geometric Regularities Automatic feature selection in neuroevolution
    See Also:
    Serialized Form
    • Constructor Detail

      • NEATGenome

        public NEATGenome(NEATGenome other)
        Construct a genome by copying another.
        Parameters:
        other - The other genome.
      • NEATGenome

        public NEATGenome(List<NEATNeuronGene> neurons,          List<NEATLinkGene> links,          int inputCount,          int outputCount)
        Create a NEAT gnome. Neuron genes will be added by reference, links will be copied.
        Parameters:
        neurons - The neurons to create.
        links - The links to create.
        inputCount - The input count.
        outputCount - The output count.
      • NEATGenome

        public NEATGenome(Random rnd,          NEATPopulation pop,          int inputCount,          int outputCount,          double connectionDensity)
        Create a new genome with the specified connection density. This constructor is typically used to create the initial population.
        Parameters:
        rnd - Random number generator.
        pop - The population.
        inputCount - The input count.
        outputCount - The output count.
        connectionDensity - The connection density.
      • NEATGenome

        public NEATGenome()
        Empty constructor for persistence.
    • Method Detail

      • getInputCount

        public int getInputCount()
        Returns:
        The number of input neurons.
      • getNetworkDepth

        public int getNetworkDepth()
        Returns:
        The network depth.
      • getNumGenes

        public int getNumGenes()
        Returns:
        The number of genes in the links chromosome.
      • getOutputCount

        public int getOutputCount()
        Returns:
        The output count.
      • setNetworkDepth

        public void setNetworkDepth(int networkDepth)
        Parameters:
        networkDepth - the networkDepth to set
      • sortGenes

        public void sortGenes()
        Sort the genes.
      • getLinksChromosome

        public List<NEATLinkGene> getLinksChromosome()
        Returns:
        the linksChromosome
      • getNeuronsChromosome

        public List<NEATNeuronGene> getNeuronsChromosome()
        Returns:
        the neuronsChromosome
      • setInputCount

        public void setInputCount(int inputCount)
        Parameters:
        inputCount - the inputCount to set
      • setOutputCount

        public void setOutputCount(int outputCount)
        Parameters:
        outputCount - the outputCount to set
      • validate

        public void validate()
        Validate the structure of this genome.
      • copy

        public void copy(Genome source)
        Copy from the specified genome into this one.
        Specified by:
        copy in interface Genome
        Parameters:
        source - The source genome.
      • size

        public int size()
        Specified by:
        size in interface Genome
        Returns:
        Return the size of this genome. This size is a relative number that indicates the complexity of the genome.
      • findNeuron

        public NEATNeuronGene findNeuron(long nodeID)
        Find the neuron with the specified nodeID.
        Parameters:
        nodeID - The nodeID to look for.
        Returns:
        The neuron, if found, otherwise null.

SCaVis 2.0 © jWork.ORG