NEATGenome
org.encog.neural.neat.training

Class NEATGenome

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable<Genome>, Genome


    public class NEATGenomeextends BasicGenomeimplements Cloneable, Serializable
    Implements a NEAT genome. This is a "blueprint" for creating a neural network. 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/
    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(long genomeID,          Chromosome neurons,          Chromosome links,          int inputCount,          int outputCount)
        Create a NEAT gnome.
        Parameters:
        genomeID - The genome id.
        neurons - The neurons.
        links - The links.
        inputCount - The input count.
        outputCount - The output count.
      • NEATGenome

        public NEATGenome(long id,          int inputCount,          int outputCount)
        Construct a genome, do not provide links and neurons.
        Parameters:
        id - The genome id.
        inputCount - The input count.
        outputCount - The output count.
      • NEATGenome

        public NEATGenome()
    • Method Detail

      • alreadyHaveThisNeuronID

        public boolean alreadyHaveThisNeuronID(long id)
        Do we already have this neuron id?
        Parameters:
        id - The id to check for.
        Returns:
        True if we already have this neuron id.
      • decode

        public void decode()
        Convert the genes to an actual network.
        Specified by:
        decode in interface Genome
      • encode

        public void encode()
        Convert the network to genes. Not currently supported.
        Specified by:
        encode in interface Genome
      • getCompatibilityScore

        public double getCompatibilityScore(NEATGenome genome)
        Get the compatibility score with another genome. Used to determine species.
        Parameters:
        genome - The other genome.
        Returns:
        The score.
      • getInputCount

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

        public Chromosome getLinks()
        Returns:
        THe links chromosome.
      • getNetworkDepth

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

        public Chromosome getNeurons()
        Returns:
        The neurons chromosome.
      • getNumGenes

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

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

        public long getSpeciesID()
        Returns:
        The species ID.
      • getSplitY

        public double getSplitY(int nd)
        Get the specified split y.
        Parameters:
        nd - The neuron.
        Returns:
        The split y.
      • isDuplicateLink

        public boolean isDuplicateLink(long fromNeuronID,                      long toNeuronID)
        Determine if this is a duplicate link.
        Parameters:
        fromNeuronID - The from neuron id.
        toNeuronID - The to neuron id.
        Returns:
        True if this is a duplicate link.
      • mutateActivationResponse

        public void mutateActivationResponse(double mutateRate,                            double maxPertubation)
        Mutate the activation response.
        Parameters:
        mutateRate - The mutation rate.
        maxPertubation - The maximum to perturb it by.
      • mutateWeights

        public void mutateWeights(double mutateRate,                 double probNewMutate,                 double maxPertubation)
        Mutate the weights.
        Parameters:
        mutateRate - The mutation rate.
        probNewMutate - The probability of a whole new weight.
        maxPertubation - The max perturbation.
      • setNetworkDepth

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

        public void setSpeciesID(long species)
        Set the species id.
        Parameters:
        species - The species id.
      • sortGenes

        public void sortGenes()
        Sort the genes.
      • getLinksChromosome

        public Chromosome getLinksChromosome()
        Returns:
        the linksChromosome
      • setLinksChromosome

        public void setLinksChromosome(Chromosome linksChromosome)
        Parameters:
        linksChromosome - the linksChromosome to set
      • getNeuronsChromosome

        public Chromosome getNeuronsChromosome()
        Returns:
        the neuronsChromosome
      • setNeuronsChromosome

        public void setNeuronsChromosome(Chromosome neuronsChromosome)
        Parameters:
        neuronsChromosome - the neuronsChromosome to set
      • setInputCount

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

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

SCaVis 2.0 © jWork.ORG