public class NEATInnovationList
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
NEATInnovationList()
The default constructor, used mainly for persistance.
|
NEATInnovationList(NEATPopulation population)
Construct an innovation list, that includes the initial innovations.
|
| Modifier and Type | Method and Description |
|---|---|
NEATInnovation |
findInnovation(long neuronID)
Find an innovation for a single neuron.
|
NEATInnovation |
findInnovation(long fromID,
long toID)
Find an innovation for a new link added between two existing neurons.
|
NEATInnovation |
findInnovationSplit(long fromID,
long toID)
Find an innovation for a hidden neuron that split a existing link.
|
java.util.Map<java.lang.String,NEATInnovation> |
getInnovations() |
static java.lang.String |
produceKeyLink(long fromID,
long toID)
Produce a key for a link.
|
static java.lang.String |
produceKeyNeuron(long id)
Produce an innovation key for a neuron.
|
static java.lang.String |
produceKeyNeuronSplit(long fromID,
long toID)
Produce a key for a split neuron.
|
void |
setPopulation(NEATPopulation population)
Set the population that this genome belongs to.
|
public NEATInnovationList()
public NEATInnovationList(NEATPopulation population)
population - The population to base this innovation list on.public static java.lang.String produceKeyNeuron(long id)
id - The neuron id.public static java.lang.String produceKeyNeuronSplit(long fromID,
long toID)
fromID - Thf from id.toID - The to id.public static java.lang.String produceKeyLink(long fromID,
long toID)
fromID - The from id.toID - The to id.public NEATInnovation findInnovationSplit(long fromID, long toID)
fromID - The source neuron ID in the link.toID - The target neuron ID in the link.public NEATInnovation findInnovation(long neuronID)
neuronID - The neuron ID to find.public NEATInnovation findInnovation(long fromID, long toID)
fromID - The source neuron ID in the link.toID - The target neuron ID in the link.public void setPopulation(NEATPopulation population)
population - The population.public java.util.Map<java.lang.String,NEATInnovation> getInnovations()