|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.genetic.genome.BasicGenome
org.encog.neural.neat.training.NEATGenome
public class NEATGenome
Implements a NEAT genome. This is a "blueprint" for creating a neural network. NeuroEvolution of Augmenting Topologies (NEAT) is a genetic algorithm for the generation of evolving artificial neural networks. It was developed by Ken Stanley while at The University of Texas at Austin. http://www.cs.ucf.edu/~kstanley/
| Field Summary | |
|---|---|
static String |
PROPERTY_LINKS
|
static String |
PROPERTY_NEURONS
|
static double |
TWEAK_DISJOINT
The adjustment factor for disjoint genes. |
static double |
TWEAK_EXCESS
The adjustment factor for excess genes. |
static double |
TWEAK_MATCHED
The adjustment factor for matched genes. |
| Constructor Summary | |
|---|---|
NEATGenome()
|
|
NEATGenome(long genomeID,
Chromosome neurons,
Chromosome links,
int inputCount,
int outputCount)
Create a NEAT gnome. |
|
NEATGenome(long id,
int inputCount,
int outputCount)
Construct a genome, do not provide links and neurons. |
|
NEATGenome(NEATGenome other)
Construct a genome by copying another. |
|
| Method Summary | |
|---|---|
boolean |
alreadyHaveThisNeuronID(long id)
Do we already have this neuron id? |
void |
decode()
Convert the genes to an actual network. |
void |
encode()
Convert the network to genes. |
double |
getCompatibilityScore(NEATGenome genome)
Get the compatibility score with another genome. |
int |
getInputCount()
|
Chromosome |
getLinks()
|
Chromosome |
getLinksChromosome()
|
int |
getNetworkDepth()
|
Chromosome |
getNeurons()
|
Chromosome |
getNeuronsChromosome()
|
int |
getNumGenes()
|
int |
getOutputCount()
|
long |
getSpeciesID()
|
double |
getSplitY(int nd)
Get the specified split y. |
boolean |
isDuplicateLink(long fromNeuronID,
long toNeuronID)
Determine if this is a duplicate link. |
void |
mutateActivationResponse(double mutateRate,
double maxPertubation)
Mutate the activation response. |
void |
mutateWeights(double mutateRate,
double probNewMutate,
double maxPertubation)
Mutate the weights. |
void |
setInputCount(int inputCount)
|
void |
setLinksChromosome(Chromosome linksChromosome)
|
void |
setNetworkDepth(int networkDepth)
|
void |
setNeuronsChromosome(Chromosome neuronsChromosome)
|
void |
setOutputCount(int outputCount)
|
void |
setSpeciesID(long species)
Set the species id. |
void |
sortGenes()
Sort the genes. |
| Methods inherited from class org.encog.ml.genetic.genome.BasicGenome |
|---|
calculateGeneCount, compareTo, equals, getAdjustedScore, getAmountToSpawn, getChromosomes, getGeneticAlgorithm, getGenomeID, getOrganism, getPopulation, getScore, mate, setAdjustedScore, setAmountToSpawn, setGeneticAlgorithm, setGenomeID, setOrganism, setPopulation, setScore, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_NEURONS
public static final String PROPERTY_LINKS
public static final double TWEAK_DISJOINT
public static final double TWEAK_EXCESS
public static final double TWEAK_MATCHED
| Constructor Detail |
|---|
public NEATGenome(NEATGenome other)
other - The other genome.
public NEATGenome(long genomeID,
Chromosome neurons,
Chromosome links,
int inputCount,
int outputCount)
genomeID - The genome id.neurons - The neurons.links - The links.inputCount - The input count.outputCount - The output count.
public NEATGenome(long id,
int inputCount,
int outputCount)
id - The genome id.inputCount - The input count.outputCount - The output count.public NEATGenome()
| Method Detail |
|---|
public boolean alreadyHaveThisNeuronID(long id)
id - The id to check for.
public void decode()
decode in interface Genomepublic void encode()
encode in interface Genomepublic double getCompatibilityScore(NEATGenome genome)
genome - The other genome.
public int getInputCount()
public Chromosome getLinks()
public int getNetworkDepth()
public Chromosome getNeurons()
public int getNumGenes()
public int getOutputCount()
public long getSpeciesID()
public double getSplitY(int nd)
nd - The neuron.
public boolean isDuplicateLink(long fromNeuronID,
long toNeuronID)
fromNeuronID - The from neuron id.toNeuronID - The to neuron id.
public void mutateActivationResponse(double mutateRate,
double maxPertubation)
mutateRate - The mutation rate.maxPertubation - The maximum to perturb it by.
public void mutateWeights(double mutateRate,
double probNewMutate,
double maxPertubation)
mutateRate - The mutation rate.probNewMutate - The probability of a whole new weight.maxPertubation - The max perturbation.public void setNetworkDepth(int networkDepth)
networkDepth - the networkDepth to setpublic void setSpeciesID(long species)
species - The species id.public void sortGenes()
public Chromosome getLinksChromosome()
public void setLinksChromosome(Chromosome linksChromosome)
linksChromosome - the linksChromosome to setpublic Chromosome getNeuronsChromosome()
public void setNeuronsChromosome(Chromosome neuronsChromosome)
neuronsChromosome - the neuronsChromosome to setpublic void setInputCount(int inputCount)
inputCount - the inputCount to setpublic void setOutputCount(int outputCount)
outputCount - the outputCount to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||