org.encog.neural.neat.training
public class NEATGenome extends BasicGenome implements Cloneable, Serializable
Constructor and Description |
---|
NEATGenome()
Empty constructor for persistence.
|
NEATGenome(List<NEATNeuronGene> neurons,
List<NEATLinkGene> links,
int inputCount,
int outputCount)
Create a NEAT gnome.
|
NEATGenome(NEATGenome other)
Construct a genome by copying another.
|
NEATGenome(Random rnd,
NEATPopulation pop,
int inputCount,
int outputCount,
double connectionDensity)
Create a new genome with the specified connection density.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(Genome source)
Copy from the specified genome into this one.
|
NEATNeuronGene |
findNeuron(long nodeID)
Find the neuron with the specified nodeID.
|
int |
getInputCount() |
List<NEATLinkGene> |
getLinksChromosome() |
int |
getNetworkDepth() |
List<NEATNeuronGene> |
getNeuronsChromosome() |
int |
getNumGenes() |
int |
getOutputCount() |
void |
setInputCount(int inputCount) |
void |
setNetworkDepth(int networkDepth) |
void |
setOutputCount(int outputCount) |
int |
size() |
void |
sortGenes()
Sort the genes.
|
String |
toString() |
void |
validate()
Validate the structure of this genome.
|
getAdjustedScore, getBirthGeneration, getPopulation, getScore, getSpecies, setAdjustedScore, setBirthGeneration, setPopulation, setScore, setSpecies
public NEATGenome(NEATGenome other)
other
- The other genome.public NEATGenome(List<NEATNeuronGene> neurons, List<NEATLinkGene> links, int inputCount, int outputCount)
neurons
- The neurons to create.links
- The links to create.inputCount
- The input count.outputCount
- The output count.public NEATGenome(Random rnd, NEATPopulation pop, int inputCount, int outputCount, double connectionDensity)
rnd
- Random number generator.pop
- The population.inputCount
- The input count.outputCount
- The output count.connectionDensity
- The connection density.public NEATGenome()
public int getInputCount()
public int getNetworkDepth()
public int getNumGenes()
public int getOutputCount()
public void setNetworkDepth(int networkDepth)
networkDepth
- the networkDepth to setpublic void sortGenes()
public List<NEATLinkGene> getLinksChromosome()
public List<NEATNeuronGene> getNeuronsChromosome()
public void setInputCount(int inputCount)
inputCount
- the inputCount to setpublic void setOutputCount(int outputCount)
outputCount
- the outputCount to setpublic void validate()
public void copy(Genome source)
public int size()
public NEATNeuronGene findNeuron(long nodeID)
nodeID
- The nodeID to look for.public String toString()
BasicGenome
toString
in class BasicGenome
Copyright © 2014. All Rights Reserved.