|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anji.neat.NeatChromosomeUtility
Utility class capturing functionality pertaining to NEAT neuron and connection genes.
Constructor Summary | |
NeatChromosomeUtility()
|
Method Summary | |
static java.util.Collection |
extractConnectionAllelesForDestNeurons(java.util.Collection connAlleles,
java.util.Collection destNeuronInnovationIds)
|
static java.util.Collection |
extractConnectionAllelesForSrcNeurons(java.util.Collection connAlleles,
java.util.Collection srcNeuronInnovationIds)
|
static java.util.List |
getConnectionList(java.util.Collection alleles)
returns all connection genes in genes as List |
static java.util.SortedMap |
getConnectionMap(java.util.Set alleles)
returns all connections in alleles as SortedMap |
static java.util.List |
getNeuronList(java.util.Collection alleles)
return all neurons in genes as List |
static java.util.List |
getNeuronList(java.util.Collection alleles,
NeuronType type)
if type == null, returns all neuron genes in genes ; otherwise, returns only
neuron genes of type |
static java.util.SortedMap |
getNeuronMap(java.util.Collection alleles)
return all neurons in alleles as SortedMap |
static java.util.SortedMap |
getNeuronMap(java.util.Collection alleles,
NeuronType type)
if type == null, returns all neurons in alleles ; otherwise, returns only
neurons of type |
static boolean |
neuronsAreConnected(java.lang.Long srcNeuronId,
java.lang.Long destNeuronId,
java.util.Collection connGenes)
non-recursive starting point for recursive search |
static ChromosomeMaterial |
newSampleChromosomeMaterial(short newNumInputs,
short newNumHidden,
short newNumOutputs,
NeatConfiguration config,
boolean fullyConnected)
factory method to construct chromosome material for neural net with specified input and output dimension, JGAP/NEAT configuration, and amount of connectivity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NeatChromosomeUtility()
Method Detail |
public static ChromosomeMaterial newSampleChromosomeMaterial(short newNumInputs, short newNumHidden, short newNumOutputs, NeatConfiguration config, boolean fullyConnected)
newNumInputs
- newNumHidden
- newNumOutputs
- config
- fullyConnected
- all layers fully connected if true, not connected at all otherwise
public static java.util.Collection extractConnectionAllelesForDestNeurons(java.util.Collection connAlleles, java.util.Collection destNeuronInnovationIds)
connAlleles
- Collection
contains ConnectionA
llele
objectsdestNeuronInnovationIds
- Collection
contains Long objects
Collection
containing ConnectionAllele
objects, those
in connAlleles
whose destination neuron is in
destNeuronInnovationIds
public static java.util.Collection extractConnectionAllelesForSrcNeurons(java.util.Collection connAlleles, java.util.Collection srcNeuronInnovationIds)
connAlleles
- Collection
contains ConnectionGene objectssrcNeuronInnovationIds
- Collection
contains Long objects
Collection
containing ConnectionGene objects, those in connGenes whose
source neuron is srcNeuronGenepublic static java.util.SortedMap getNeuronMap(java.util.Collection alleles)
alleles
as SortedMap
alleles
- Collection
contains Allele
objects
SortedMap
containing key Long
innovation id, value
NeuronGene
objectsgetNeuronMap(Collection, NeuronType)
public static java.util.List getNeuronList(java.util.Collection alleles)
genes
as List
alleles
- Collection
contains Allele
objects
List
containing NeuronGene
objectsgetNeuronList(Collection, NeuronType)
public static java.util.SortedMap getNeuronMap(java.util.Collection alleles, NeuronType type)
alleles
; otherwise, returns only
neurons of type
alleles
- Collection
contains Allele
objectstype
-
public static java.util.List getNeuronList(java.util.Collection alleles, NeuronType type)
genes
; otherwise, returns only
neuron genes of type
alleles
- Collection
contains gene objectstype
-
List
contains NeuronAllele
objectspublic static java.util.SortedMap getConnectionMap(java.util.Set alleles)
alleles
as SortedMap
alleles
- SortedSet
contains Allele
objects
SortedMap
containing key Long
innovation id, value
ConnectionAllele
objectspublic static java.util.List getConnectionList(java.util.Collection alleles)
genes
as List
alleles
- Collection
contains gene objects
List
containing ConnectionGene
objectspublic static boolean neuronsAreConnected(java.lang.Long srcNeuronId, java.lang.Long destNeuronId, java.util.Collection connGenes)
srcNeuronId
- destNeuronId
- connGenes
-
srcNeuronId
and destNeuronId
are connectedNeatChromosomeUtility#neuronsAreConnected(Long, Long, Collection, Set)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |