simbad.picoevo.ext.evolution
Class VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate

java.lang.Object
  extended by simbad.picoevo.core.evolution.Operator
      extended by simbad.picoevo.core.evolution.VariationOperator
          extended by simbad.picoevo.ext.evolution.VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate
All Implemented Interfaces:
java.lang.Cloneable

public class VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate
extends VariationOperator


Field Summary
protected  boolean abortSD
           
protected  boolean completeSD
           
protected  Population_NEATPopulation_InnovationList innovationList
           
protected  int maxSDMutationAttempt
           
protected  double mutationRateSD
           
(package private)  java.util.Random rand
           
 
Fields inherited from class simbad.picoevo.core.evolution.VariationOperator
_operatorRate
 
Fields inherited from class simbad.picoevo.core.evolution.Operator
_name
 
Constructor Summary
VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name)
           
VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name, double rate)
           
VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name, double rate, Population_NEATPopulation_InnovationList _innovationList, int _maxSDMutationAttempt)
           
VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name, Population_NEATPopulation_InnovationList _innovationList, int _maxSDMutationAttempt)
           
 
Method Summary
private  boolean alreadyHaveThisNeuronID(int id, Individual_NEATIndividual genome)
           
 void applyOperator(EvolutionObject object)
          Perform Segmental Duplication Definition: A segment contains n nodes, where n is greater than zero and n does not contain input or output nodes.
private  int getElementPosition(int neuronId, Individual_NEATIndividual genome)
           
private  Element_NEAT_LGene getPathNextRandomNode(Element_NEAT_NGene fromNeuron, Individual_NEATIndividual genome)
           
private  int randInt(int x, int y)
           
 
Methods inherited from class simbad.picoevo.core.evolution.VariationOperator
clone, displayInformation, setRate
 
Methods inherited from class simbad.picoevo.core.evolution.Operator
getName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mutationRateSD

protected double mutationRateSD

innovationList

protected Population_NEATPopulation_InnovationList innovationList

maxSDMutationAttempt

protected int maxSDMutationAttempt

abortSD

protected boolean abortSD

completeSD

protected boolean completeSD

rand

java.util.Random rand
Constructor Detail

VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate

public VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name)

VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate

public VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name,
                                                                    double rate)

VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate

public VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name,
                                                                    Population_NEATPopulation_InnovationList _innovationList,
                                                                    int _maxSDMutationAttempt)

VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate

public VariationOperator_Individual_SDNEAT_MutationSegmentDuplicate(java.lang.String __name,
                                                                    double rate,
                                                                    Population_NEATPopulation_InnovationList _innovationList,
                                                                    int _maxSDMutationAttempt)
Method Detail

applyOperator

public void applyOperator(EvolutionObject object)
Perform Segmental Duplication Definition: A segment contains n nodes, where n is greater than zero and n does not contain input or output nodes. The segments first link must come from an input node and its last link must lead to an output node. A segment does not include recurrent links. Behaviour: This function will attempt to find a path in the network from a random input node to a random output node. Once a path is found the nodes in that path will be duplicated and inserted as new innovations along with a set of new links connecting it to the original input and output node. The values from the original list of nodes should have been copied to the new segment to preserve the original knowledge but the segment is subject to higher than normal mutation rates as it is hoped the segment might make a generational quantum leap.

Specified by:
applyOperator in class VariationOperator
Parameters:
object -

getPathNextRandomNode

private Element_NEAT_LGene getPathNextRandomNode(Element_NEAT_NGene fromNeuron,
                                                 Individual_NEATIndividual genome)

alreadyHaveThisNeuronID

private boolean alreadyHaveThisNeuronID(int id,
                                        Individual_NEATIndividual genome)

getElementPosition

private int getElementPosition(int neuronId,
                               Individual_NEATIndividual genome)

randInt

private int randInt(int x,
                    int y)