|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.micropsi.nodenet.NetEntity
org.micropsi.nodenet.Module
org.micropsi.nodenet.NodeSpaceModule
NodeSpaceModules (aka NodeSpaces) are modules that contain nodes. Besides any
number of concept, register, sensor and actor nodes, NodeSpaces contain
exactly one of the special node types: associator, dissociator, activator,
deactivator and one directional acivator for each gate type.
NodeSpaces are modules, hence they are hierarchical. Any non-special node to
be member of a NodeSpace is also a member of all higher NodeSpaces within
the NodeSpace's branch.
As modules, NodeSpaces can have Gates and
Slots themselves. The values of the slots can be read within the NodeSpace by
sensor nodes, the gates can be written via actor nodes - the dataSources and
dataTargets will be created automatically with the slots and gates.
This
makes modules very flexible: It is possible to replace some module written in
Java (as a NativeModule) by a module working with node scripts (in a
NodeSpace) afterwards without having to change the system - if the timing is
the same or the timining does not matter.
| Field Summary | |
protected double |
DISSOCIATIONCONST
The NodeSpace's dissociation constant. |
protected double |
LEARNINGCONST
learning constant for associator learning |
protected double |
STRENGTHENINGCONST
learning constant for strenthening of used links |
| Fields inherited from class org.micropsi.nodenet.Module |
moduleManager, parent |
| Fields inherited from class org.micropsi.nodenet.NetEntity |
entityManager, gates, slots |
| Fields inherited from interface org.micropsi.nodenet.NetIntegrityIF |
BAD_KEY, BAD_LINK, BAD_OUTPUT_FUNCTION, BAD_SLOT, DUPLICATE_KEY, UNKNOWN_ENTITY, UNKNOWN_MODULE |
| Constructor Summary | |
protected |
NodeSpaceModule(java.lang.String id,
java.lang.String parent,
ModuleManager moduleManager,
NetEntityManager entityManager,
SensActRegistry sensActRegistry)
Creates a new NodeSpaceModule. |
| Method Summary | |
protected void |
attachEntity(java.lang.String id,
boolean levelOne)
Attaches an entity to this nodespace and makes it a member. |
protected void |
calculateGates()
Calculates the gates. |
protected void |
changeParameter(int parameterType,
int subID,
java.lang.String newValue)
Changes a parameter of this entity or one of it's slots, gates or hidden implementation. |
boolean |
containsEntity(java.lang.String entityID)
Checks if the NodeSpace contains the given entity. |
boolean |
containsEntityDirectly(java.lang.String entityID)
Checks if the NodeSpace directly contains the given entity |
protected Gate |
createGate(int gateType)
Creates a new gate for the NodeSpace and creates the corresponding DataTarget. |
protected Slot |
createSlot(int slotType)
Creates a slot and generates the corresponding DataSource. |
protected void |
deleteGate(int gateType)
Deletes a gate and removes the corresponding DataTarget. |
protected void |
deleteSlot(int slotType)
Deletes a slot and removes the corresponding DataSource. |
void |
destroy()
Frees as many references as possible to avoid too much gc activity |
NetEntity |
getActCat()
Returns the NodeSpace's ActCat node Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getActExp()
Returns the NodeSpace's ActExp node Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getActivator()
Returns the NodeSpace's Activator node Can be null if there is no such node assigned to the NodeSpace. |
protected java.util.Iterator |
getActiveEntityIDs()
Returns the IDs of all entities that are currently active AND members of the NodeSpace |
NetEntity |
getActPor()
Returns the NodeSpace's ActPor node Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getActRef()
Returns the NodeSpace's ActRef node Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getActRet()
Returns the NodeSpace's ActRet node Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getActSub()
Returns the NodeSpace's ActSub node Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getActSur()
Returns the NodeSpace's ActSur node Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getActSym()
Returns the NodeSpace's ActSym node Can be null if there is no such node assigned to the NodeSpace. |
java.util.Iterator |
getAllEntities()
Returns all entities (instances) that are members of the NodeSpace. |
java.util.Iterator |
getAllLevelOneEntities()
Returns all entities (instances) that are direct members of the NodeSpace (not of one of the contained NodeSpaces) |
NetEntity |
getAssociator()
Returns the NodeSpace's associator Can be null if there is no such node assigned to the NodeSpace. |
NetEntity |
getDeactivator()
Returns the NodeSpace's deactivator. |
double |
getDissociationConstant()
Returns the NodeSpace's dissociation constant. |
NetEntity |
getDissociator()
Returns the NodeSpaces's dissociator. |
protected NetEntityManager |
getEntityManager()
Returns the EntityManager |
int |
getEntityType()
Returns the type of the entity |
double |
getLearningConstant()
Retuns the net's learning constant. |
double |
getStrengtheningConstant()
Returns the net's strengthening constant (for strengthening-by-use link weight modifications) |
boolean |
hasDeletedLinks()
Returns true if links have been deleted at any of the directly contained nodes of this nodespace within the last net cycle. |
void |
notifyObservers()
Notifies all registered observers of changes within the module. |
void |
registerObserver(NodeSpaceObserverIF observer)
Register an observer to monitor changes in the NodeSpace. |
protected void |
reportEntityDeletion(java.lang.String id)
Called from the outside to notify the module of the fact that some entity was deleted |
protected void |
setHasDeletedLinks(boolean b)
Sets the "deleted links" flag. |
void |
unregisterObserver(NodeSpaceObserverIF observer)
Unregister an observer. |
| Methods inherited from class org.micropsi.nodenet.Module |
changeParent, getParent, isRoot |
| Methods inherited from class org.micropsi.nodenet.NetEntity |
addGate, addSlot, checkIntegrity, confirmNewActivation, createLinkTo, createLinkTo, deleteLink, getEntityName, getFirstLinkAt, getGate, getGates, getID, getLastLinkAt, getLink, getNumberOfGates, getNumberOfSlots, getParentID, getSlot, getSlots, hasName, isActive, propagateActivation, reportIntegrityStatus, setEntityName, setParentID, toString, unlinkCompletely, updateDecayState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double DISSOCIATIONCONST
DissociatorNodeprotected double LEARNINGCONST
protected double STRENGTHENINGCONST
| Constructor Detail |
protected NodeSpaceModule(java.lang.String id,
java.lang.String parent,
ModuleManager moduleManager,
NetEntityManager entityManager,
SensActRegistry sensActRegistry)
throws NetIntegrityException
id - the ID of the module/entityparent - the NodeSpace's parent modulemoduleManager - the module managerentityManager - the entity managersensActRegistry - the SensActRegistry
NetIntegrityException - if the ID already exists within the net| Method Detail |
protected void attachEntity(java.lang.String id,
boolean levelOne)
throws NetIntegrityException
id - the ID of the entity to be attached.
NetIntegrityException - if there is no such entity
protected Gate createGate(int gateType)
throws NetIntegrityException
gateType - the type of the gate to be created
NetIntegrityException - if the NodeSpace already has a gate of that
type
protected void deleteGate(int gateType)
throws NetIntegrityException
deleteGate in class NetEntitygateType - the type of the gate to be removed
NetIntegrityException - if there is no such gate
protected Slot createSlot(int slotType)
throws NetIntegrityException
slotType - the type of the slot to be created.
NetIntegrityException - if the NodeSpace already has a slot of that
type
protected void deleteSlot(int slotType)
throws NetIntegrityException
deleteSlot in class NetEntityslotType - the type of the slot to be removed
NetIntegrityException - if the space has no such slotpublic boolean containsEntity(java.lang.String entityID)
entityID - the ID of the entity
public boolean containsEntityDirectly(java.lang.String entityID)
entityID - the ID of the entity
public java.util.Iterator getAllEntities()
public java.util.Iterator getAllLevelOneEntities()
protected java.util.Iterator getActiveEntityIDs()
protected NetEntityManager getEntityManager()
public double getDissociationConstant()
public double getLearningConstant()
public double getStrengtheningConstant()
protected void reportEntityDeletion(java.lang.String id)
Module
reportEntityDeletion in class Moduleid - the deleted entity's ID.Module.reportEntityDeletion(String)public void registerObserver(NodeSpaceObserverIF observer)
observer - the observerpublic void unregisterObserver(NodeSpaceObserverIF observer)
observer - the observerpublic void notifyObservers()
Module
notifyObservers in class ModuleModule.notifyObservers()public int getEntityType()
NetEntity
getEntityType in class NetEntityNetEntity.getEntityType()
protected void calculateGates()
throws NetIntegrityException
NetEntity
calculateGates in class NetEntityNetIntegrityExceptionNetEntity.calculateGates()
protected void changeParameter(int parameterType,
int subID,
java.lang.String newValue)
throws NetIntegrityException
NetEntity
changeParameter in class NetEntityparameterType - the parameter to be changedsubID - the subid. Depending on the parameterType used, this can be
the type of a slot, a gate or the key of a parameter of a hidden
implementation (typically of a NativeModule)newValue - The new value as String
NetIntegrityException - if the slot or gate was not foundNetEntity.changeParameter(int, int, String)public NetEntity getActCat()
public NetEntity getActExp()
public NetEntity getActivator()
public NetEntity getActPor()
public NetEntity getActRet()
public NetEntity getActSub()
public NetEntity getActSur()
public NetEntity getActSym()
public NetEntity getActRef()
public NetEntity getAssociator()
public NetEntity getDeactivator()
public NetEntity getDissociator()
protected void setHasDeletedLinks(boolean b)
public boolean hasDeletedLinks()
public void destroy()
NetEntity
destroy in class NetEntity
|
(c) by Micropsi Project: http://www.cognitive-agents.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||