|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anji.neat.NeatIdMap
Extension of JGAP configuration with NEAT-specific features added.
Field Summary | |
static java.lang.String |
CONNECTION_ID_MAP_XML_TAG
XML tag for NEAT ID mapping,connection ID |
static java.lang.String |
CONNECTION_ID_XML_TAG
XML tag for NEAT ID mapping, connection ID |
static java.lang.String |
CONNECTION_TO_CONNECTION_XML_TAG
XML tag for NEAT ID mapping, connection |
static java.lang.String |
CONNECTION_TO_NEURON_XML_TAG
XML tag for NEAT ID mapping, neuron |
static java.lang.String |
DEST_NEURON_ID_XML_TAG
XML tag for NEAT ID mapping, destination neuron ID |
static java.lang.String |
ID_XML_TAG
XML tag for NEAT ID mapping, innovation ID |
static java.lang.String |
NEAT_ID_MAP_FILE_KEY
properties key, file containing mappings of NEAT innovation IDs |
static java.lang.String |
NEAT_ID_MAP_XML_TAG
base XML tag for NEAT ID mapping |
static java.lang.String |
NEURON_ID_MAP_XML_TAG
XML tag for NEAT ID mapping, neuron ID |
static java.lang.String |
SRC_NEURON_ID_XML_TAG
XML tag for NEAT ID mapping, source neuron ID |
Constructor Summary | |
NeatIdMap(Properties newProps)
See Parameter Details for specific property settings. |
Method Summary | |
protected java.util.List |
buildList(java.lang.Long srcNeuronId,
java.lang.Long destNeuronId)
creates list used us key between src/dest neuron pairs and connection |
java.lang.Long |
findConnectionId(java.lang.Long srcNeuronId,
java.lang.Long destNeuronId)
|
java.lang.Long |
findNeuronId(java.lang.Long connectionId)
|
void |
load()
Load ID factories and maps. |
void |
log(org.apache.log4j.Logger aLogger,
org.apache.log4j.Priority pri)
log stats for id maps |
protected void |
putConnectionId(java.lang.Long srcNeuronId,
java.lang.Long destNeuronId,
java.lang.Long newConnectionId)
store mapping between neurons srcNeuronId and destNeuronId
and the connection that mutated between them via NEAT add connection mutation,
newConnectionId |
protected void |
putNeuronId(java.lang.Long connectionId,
java.lang.Long newNeuronId)
store mapping between connection connectionId and the neuron that replaced
it via NEAT add neuron mutation, newNeuronId |
boolean |
store()
Persist ID factories and maps. |
java.lang.String |
toXml()
Convert NEAT ID mappings (enables re-use of innovation IDs) to XML string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NEAT_ID_MAP_FILE_KEY
public static final java.lang.String NEAT_ID_MAP_XML_TAG
public static final java.lang.String NEURON_ID_MAP_XML_TAG
public static final java.lang.String CONNECTION_ID_MAP_XML_TAG
public static final java.lang.String CONNECTION_TO_NEURON_XML_TAG
public static final java.lang.String ID_XML_TAG
public static final java.lang.String CONNECTION_ID_XML_TAG
public static final java.lang.String CONNECTION_TO_CONNECTION_XML_TAG
public static final java.lang.String SRC_NEURON_ID_XML_TAG
public static final java.lang.String DEST_NEURON_ID_XML_TAG
Constructor Detail |
public NeatIdMap(Properties newProps)
newProps
- NeatIdMap#init(Properties)
Method Detail |
public java.lang.Long findNeuronId(java.lang.Long connectionId)
connectionId
-
connectionId
public java.lang.Long findConnectionId(java.lang.Long srcNeuronId, java.lang.Long destNeuronId)
srcNeuronId
- destNeuronId
-
srcNeuronId
to neuron destNeuronId
protected void putNeuronId(java.lang.Long connectionId, java.lang.Long newNeuronId)
connectionId
and the neuron that replaced
it via NEAT add neuron mutation, newNeuronId
connectionId
- newNeuronId
- protected void putConnectionId(java.lang.Long srcNeuronId, java.lang.Long destNeuronId, java.lang.Long newConnectionId)
srcNeuronId
and destNeuronId
and the connection that mutated between them via NEAT add connection mutation,
newConnectionId
srcNeuronId
- destNeuronId
- newConnectionId
- protected java.util.List buildList(java.lang.Long srcNeuronId, java.lang.Long destNeuronId)
srcNeuronId
- destNeuronId
-
public void load() throws java.io.IOException
java.io.IOException
public boolean store() throws java.io.IOException
java.io.IOException
public java.lang.String toXml()
public void log(org.apache.log4j.Logger aLogger, org.apache.log4j.Priority pri)
aLogger
- pri
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |