public class NEATGenome extends BasicGenome implements java.lang.Cloneable, java.io.Serializable
| Constructor and Description |
|---|
NEATGenome()
Empty constructor for persistence.
|
NEATGenome(java.util.List<NEATNeuronGene> neurons,
java.util.List<NEATLinkGene> links,
int inputCount,
int outputCount)
Create a NEAT gnome.
|
NEATGenome(NEATGenome other)
Construct a genome by copying another.
|
NEATGenome(java.util.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() |
java.util.List<NEATLinkGene> |
getLinksChromosome() |
int |
getNetworkDepth() |
java.util.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.
|
java.lang.String |
toString() |
void |
validate()
Validate the structure of this genome.
|
getAdjustedScore, getBirthGeneration, getPopulation, getScore, getSource, getSpecies, setAdjustedScore, setBirthGeneration, setPopulation, setScore, setSource, setSpeciespublic NEATGenome(NEATGenome other)
other - The other genome.public NEATGenome(java.util.List<NEATNeuronGene> neurons, java.util.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(java.util.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 java.util.List<NEATLinkGene> getLinksChromosome()
public java.util.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 java.lang.String toString()
BasicGenometoString in class BasicGenome