|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgap.MutationOperator
com.anji.neat.AddConnectionMutationOperator
Implements NEAT add connection mutation inspired by Evolving Neural Networks through Augmenting Topologies . In ANJI, mutation rate refers to the likelihood of any candidate new mutation (i.e., any 2 unconnected nodes, not counting those that would create a loop if recurrency is disabled) occurring. 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.
Field Summary | |
static java.lang.String |
ADD_CONN_MUTATE_RATE_KEY
properties key, add connection mutation rate |
static float |
DEFAULT_MUTATE_RATE
default mutation rate |
Constructor Summary | |
AddConnectionMutationOperator()
|
|
AddConnectionMutationOperator(float newMutationRate)
|
|
AddConnectionMutationOperator(float aMutationRate,
RecurrencyPolicy aPolicy)
Creates new operator with specified mutation rate and recurrency policy. |
|
AddConnectionMutationOperator(RecurrencyPolicy aPolicy)
Creates new operator with specified recurrency policy. |
Method Summary | |
void |
addSingleConnection(NeatConfiguration config,
java.util.List neuronList,
java.util.SortedMap conns,
java.util.Set allelesToAdd)
Given the collections of neurons and connections, returns the new connection that should be added. |
void |
init(Properties props)
|
protected void |
mutate(Configuration jgapConfig,
ChromosomeMaterial target,
java.util.Set allelesToAdd,
java.util.Set allelesToRemove)
Adds connections according to NEAT add connection mutation. |
Methods inherited from class org.jgap.MutationOperator |
doesMutationOccur, doesMutationOccur, getMutationRate, mutate, numMutations, setMutationRate, updateMaterial |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ADD_CONN_MUTATE_RATE_KEY
public static final float DEFAULT_MUTATE_RATE
Constructor Detail |
public AddConnectionMutationOperator()
AddConnectionMutationOperator(float)
public AddConnectionMutationOperator(float newMutationRate)
newMutationRate
- AddConnectionMutationOperator(float, RecurrencyPolicy)
public AddConnectionMutationOperator(RecurrencyPolicy aPolicy)
aPolicy
- RecurrencyPolicy
public AddConnectionMutationOperator(float aMutationRate, RecurrencyPolicy aPolicy)
aMutationRate
- aPolicy
- RecurrencyPolicy
Method Detail |
public void init(Properties props) throws java.lang.Exception
init
in interface Configurable
props
- configuration parameters
java.lang.Exception
Configurable.init(com.anji.util.Properties)
protected void mutate(Configuration jgapConfig, ChromosomeMaterial target, java.util.Set allelesToAdd, java.util.Set allelesToRemove)
mutate
in class MutationOperator
jgapConfig
- target
- chromosome material to mutateallelesToAdd
- Set
contains Allele
objectsallelesToRemove
- Set
contains Allele
objectsMutationOperator.mutate(org.jgap.Configuration, org.jgap.ChromosomeMaterial,
java.util.Set, java.util.Set)
public void addSingleConnection(NeatConfiguration config, java.util.List neuronList, java.util.SortedMap conns, java.util.Set allelesToAdd)
config
- neuronList
- List
contains NeuronAllele
objectsconns
- SortedMap
contains ConnectionAllele
objects;
contains new connection allele addedallelesToAdd
- Set
contains Allele
objects; contains new
connection allele added TOTO - allele (callers)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |