|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.memphis.ccrg.lida.framework.initialization.InitializableImpl
edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
edu.memphis.ccrg.lida.proceduralmemory.ProceduralMemoryImpl
public class ProceduralMemoryImpl
Default implementation of ProceduralMemory. Indexes scheme by context
elements for quick access. Assumes that the Condition of Scheme are Node only.
| Nested Class Summary | |
|---|---|
static class |
ProceduralMemoryImpl.ConditionType
The possible type of usage for a condition inside a Scheme |
protected class |
ProceduralMemoryImpl.InternalNodeStructure
Allows Nodes to be added without copying. |
| Field Summary |
|---|
| Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
|---|
taskSpawner |
| Constructor Summary | |
|---|---|
ProceduralMemoryImpl()
|
|
| Method Summary | |
|---|---|
void |
activateSchemes()
Using the broadcast, activate the relevant schemes of ProceduralMemory |
(package private) Condition |
addCondition(Condition c)
Add Condition c to the condition pool if it is not already stored. |
void |
addListener(ModuleListener l)
Override this method to add a listener to the module |
boolean |
containsScheme(Scheme s)
Returns whether this procedural memory contains specified scheme. |
Behavior |
createInstantiation(Scheme s)
Instantiates specified Scheme . |
void |
decayModule(long ticks)
Decay only this Module. |
NodeStructure |
getBroadcastBuffer()
Gets the broadcast buffer. |
java.util.Collection<Condition> |
getConditionPool()
Gets the condition pool. |
java.lang.Object |
getModuleContent(java.lang.Object... params)
Intended to be called from the GUI. |
Scheme |
getNewScheme(Action a)
Gets a new Scheme having specified Action. |
int |
getSchemeCount()
Returns a count of the schemes |
java.util.Collection<Scheme> |
getSchemes()
Returns a view of all Scheme objects currently in the ProceduralMemory. |
(package private) void |
indexScheme(Scheme s,
Condition c,
ProceduralMemoryImpl.ConditionType type)
Add a reference to specified Scheme from specified condition. |
void |
init()
This module can initialize the following parameters: proceduralMemory.schemeSelectionThreshold type=double amount of activation schemes must have to be instantiated, default is 0.0 proceduralMemory.contextWeight type=double The weight of context conditions for the calculation of scheme activation. |
void |
learn(Coalition coalition)
A place-holder method to remind implementing classes that they should implement learning. |
void |
receiveBroadcast(Coalition coal)
Listener must receive a broadcast of a the winning Coalition
This method should return as possible in order to not delay the rest of the broadcasting. |
void |
removeScheme(Scheme s)
Removes specified Scheme. |
boolean |
shouldInstantiate(Scheme s,
NodeStructure broadcastBuffer)
Returns true if the specified scheme's total activation is greater than the scheme selection threshold. |
| Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
|---|
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setAssociatedModule, setModuleName, taskManagerDecayModule, toString |
| Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl |
|---|
containsParameter, getParam, getParameters, init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.memphis.ccrg.lida.framework.FrameworkModule |
|---|
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule |
| Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.FullyInitializable |
|---|
setAssociatedModule |
| Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable |
|---|
containsParameter, getParam, getParameters, init |
| Constructor Detail |
|---|
public ProceduralMemoryImpl()
| Method Detail |
|---|
public void init()
Scheme class used by this module
init in interface Initializableinit in class InitializableImplInitializablepublic void addListener(ModuleListener l)
FrameworkModuleImpl
addListener in interface FrameworkModuleaddListener in class FrameworkModuleImpll - - listener of this FrameworkModulepublic Scheme getNewScheme(Action a)
ProceduralMemoryScheme having specified Action.
getNewScheme in interface ProceduralMemorya - an Action
Scheme with Action aCondition addCondition(Condition c)
Condition c to the condition pool if it is not already stored.
Returns the stored condition with same id as c.
This method is intended to be used only by SchemeImpl to ensure that all schemes
in the ProceduralMemory share the same condition instances.
c - the condition to add to the condition pool.
void indexScheme(Scheme s,
Condition c,
ProceduralMemoryImpl.ConditionType type)
s - the Scheme to indexc - the conditiontype - the type of the condition. This select the indexing mappublic void receiveBroadcast(Coalition coal)
BroadcastListenerCoalition
This method should return as possible in order to not delay the rest of the broadcasting.
receiveBroadcast in interface BroadcastListenercoal - the Coalition that won the most recent competition for consciousnesspublic void learn(Coalition coalition)
BroadcastListenerGlobalWorkspace
and thus it should be managed by the receiving module.
learn in interface BroadcastListenercoalition - the Coalition that won the most recent competition for consciousnesspublic void activateSchemes()
ProceduralMemoryProceduralMemory
activateSchemes in interface ProceduralMemory
public boolean shouldInstantiate(Scheme s,
NodeStructure broadcastBuffer)
init() method.
shouldInstantiate in interface ProceduralMemorys - the Scheme to be checkedbroadcastBuffer - the NodeStructure in ProceduralMemory containing recent broadcast
Scheme should be instantiated, false otherwise.public Behavior createInstantiation(Scheme s)
ProceduralMemoryScheme .
createInstantiation in interface ProceduralMemorys - a Scheme over instantiation threshold
Behavior, an instantiation of Scheme spublic void decayModule(long ticks)
FrameworkModule
decayModule in interface FrameworkModuleticks - number of ticks to decay.public void removeScheme(Scheme s)
ProceduralMemoryScheme.
removeScheme in interface ProceduralMemorys - scheme to be removed.public boolean containsScheme(Scheme s)
ProceduralMemory
containsScheme in interface ProceduralMemorys - a Scheme
public int getSchemeCount()
ProceduralMemory
getSchemeCount in interface ProceduralMemorypublic java.util.Collection<Scheme> getSchemes()
ProceduralMemoryScheme objects currently in the ProceduralMemory.
getSchemes in interface ProceduralMemoryCollection of schemespublic java.lang.Object getModuleContent(java.lang.Object... params)
FrameworkModuleImpl
getModuleContent in interface FrameworkModulegetModuleContent in class FrameworkModuleImplparams - parameters specifying what content will be returned
public java.util.Collection<Condition> getConditionPool()
UnmodifiableCollection of the condition in the poolpublic NodeStructure getBroadcastBuffer()
NodeStructure containing recent broadcasts
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||