Documentation of 'org.encog.neural.neat.training.opp.NEATMutation' Java class
NEATMutation
org.encog.neural.neat.training.opp

Class NEATMutation

  • All Implemented Interfaces:
    java.io.Serializable, EvolutionaryOperator
    Direct Known Subclasses:
    NEATMutateAddLink, NEATMutateAddNode, NEATMutateRemoveLink, NEATMutateWeights


    public abstract class NEATMutation
    extends java.lang.Object
    implements EvolutionaryOperator, java.io.Serializable
    This class represents a NEAT mutation. NEAT supports several different types of mutations. This class provides common utility needed by any sort of a NEAT mutation. This class is abstract and cannot be used by itself. ----------------------------------------------------------------------------- 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

      • NEATMutation

        public NEATMutation()
    • Method Detail

      • chooseRandomNeuron

        public NEATNeuronGene chooseRandomNeuron(NEATGenome target,
                                                 boolean choosingFrom)
        Choose a random neuron.
        Parameters:
        target - The target genome. Should the input and bias neurons be included.
        choosingFrom - True if we are chosing from all neurons, false if we exclude the input and bias.
        Returns:
        The random neuron.
      • createLink

        public void createLink(NEATGenome target,
                               long neuron1ID,
                               long neuron2ID,
                               double weight)
        Create a link between two neuron id's. Create or find any necessary innovation records.
        Parameters:
        target - The target genome.
        neuron1ID - The id of the source neuron.
        neuron2ID - The id of the target neuron.
        weight - The weight of this new link.
      • getElementPos

        public int getElementPos(NEATGenome target,
                                 long neuronID)
        Get the specified neuron's index.
        Parameters:
        target - The target genome.
        neuronID - The neuron id to check for.
        Returns:
        The index.
      • init

        public void init(EvolutionaryAlgorithm theOwner)
        Called to setup the evolutionary operator.
        Specified by:
        init in interface EvolutionaryOperator
        Parameters:
        theOwner - The evolutionary algorithm used with this operator.
      • isDuplicateLink

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

        public boolean isNeuronNeeded(NEATGenome target,
                                      long neuronID)
        Determines if a neuron is still needed. If all links to/from a neuron have been removed, then the neuron is no longer needed.
        Parameters:
        target - The target genome.
        neuronID - The neuron id to check for.
        Returns:
        Returns true, if the neuron is still needed.
      • obtainGenome

        public NEATGenome obtainGenome(Genome[] parents,
                                       int parentIndex,
                                       Genome[] offspring,
                                       int offspringIndex)
        Obtain the NEATGenome that we will mutate. NEAT mutates the genomes in place. So the parent and child genome must be the same literal object. Throw an exception, if this is not the case.
        Parameters:
        parents - The parents.
        parentIndex - The parent index.
        offspring - The offspring.
        offspringIndex - The offspring index.
        Returns:
        The genome that we will mutate.
      • parentsNeeded

        public int parentsNeeded()
        Specified by:
        parentsNeeded in interface EvolutionaryOperator
        Returns:
        Returns 1, as mutations typically are asexual and only require a single parent.
      • removeNeuron

        public void removeNeuron(NEATGenome target,
                                 long neuronID)
        Remove the specified neuron.
        Parameters:
        target - The target genome.
        neuronID - The neuron to remove.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.