com.anji.neat
Class AddNeuronMutationOperator
java.lang.Object
org.jgap.MutationOperator
com.anji.neat.AddNeuronMutationOperator
- All Implemented Interfaces:
- Configurable
public class AddNeuronMutationOperator
- extends MutationOperator
- implements Configurable
Implements NEAT add node mutation inspired by Evolving Neural Networks
through Augmenting Topologies . In ANJI, mutation rate refers to the likelihood of a new
node being created on any existing connection. In traditional NEAT, it is the likelihood of a
chromosome experiencing a mutation, and each chromosome can not have more than one
topological mutation per generation.
- Author:
- Philip Tucker
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ADD_NEURON_MUTATE_RATE_KEY
public static final java.lang.String ADD_NEURON_MUTATE_RATE_KEY
- properties key, add neuron mutation rate
- See Also:
- Constant Field Values
DEFAULT_MUTATE_RATE
public static final float DEFAULT_MUTATE_RATE
- default mutation rate
- See Also:
- Constant Field Values
AddNeuronMutationOperator
public AddNeuronMutationOperator()
- See Also:
AddNeuronMutationOperator(float)
AddNeuronMutationOperator
public AddNeuronMutationOperator(float newMutationRate)
- See Also:
MutationOperator.MutationOperator(float)
init
public void init(Properties props)
throws java.lang.Exception
- Specified by:
init in interface Configurable
- Parameters:
props - configuration parameters
- Throws:
java.lang.Exception- See Also:
Configurable.init(com.anji.util.Properties)
mutate
protected void mutate(Configuration jgapConfig,
ChromosomeMaterial target,
java.util.Set allelesToAdd,
java.util.Set allelesToRemove)
- Adds connections according to NEAT add node mutation.
- Specified by:
mutate in class MutationOperator
target - chromosome material before mutationallelesToAdd - alleles added by this mutation, Set contains
Allele objectsallelesToRemove - alleles removed by this mutation, Set contains
Allele objects- See Also:
MutationOperator.mutate(org.jgap.Configuration, org.jgap.ChromosomeMaterial,
java.util.Set, java.util.Set)
addNeuronAtConnection
public boolean addNeuronAtConnection(NeatConfiguration config,
java.util.Map neurons,
ConnectionAllele oldConnectAllele,
java.util.Set allelesToAdd,
java.util.Set allelesToRemove)
- Parameters:
config - neurons - Map contains NeuronAllele objectsoldConnectAllele - connection allele to be replaced by neuronallelesToAdd - Set contains Allele objectsallelesToRemove - Set contains Allele objects
- Returns:
- true iff neuron added