|
||||||||||
| 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.globalworkspace.GlobalWorkspaceImpl
public class GlobalWorkspaceImpl
The default implementation of GlobalWorkspace which maintains the collection of
Coalition objects. It supports BroadcastTrigger tasks that are in charge
of triggering the new broadcast. This class maintains a list of
BroadcastListener which are the modules that are registered to receive winning coalitions.
| Field Summary |
|---|
| Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
|---|
taskSpawner |
| Constructor Summary | |
|---|---|
GlobalWorkspaceImpl()
Constructs a new instance with default values |
|
| Method Summary | |
|---|---|
void |
addBroadcastListener(BroadcastListener bl)
Adds and registers a BroadcastListener. |
void |
addBroadcastTrigger(BroadcastTrigger t)
Adds and registers specified BroadcastTrigger |
boolean |
addCoalition(Coalition coalition)
Adds specified Coalition |
void |
addListener(ModuleListener listener)
Override this method to add a listener to the module |
void |
decayModule(long ticks)
Decay only this Module. |
long |
getBroadcastSentCount()
Returns the number of broadcasts sent. |
DecayStrategy |
getCoalitionDecayStrategy()
Gets the DecayStrategy used by Coalition objects in this module |
double |
getCoalitionRemovalThreshold()
Gets coalition removal threshold |
java.lang.Object |
getModuleContent(java.lang.Object... params)
Intended to be called from the GUI. |
int |
getRefractoryPeriod()
Gets refractoryPeriod |
long |
getTickAtLastBroadcast()
Gets the tick at last broadcast |
void |
init()
Initializes parameters with the following names and types: globalWorkspace.coalitionRemovalThreshold type=double amount of activation coalitions must have to remain in the GlobalWorkspace globalWorkspace.coalitionDecayStrategy type=string name of the decay strategy used by all coalitions in the GlobalWorkspace globalWorkspace.refractoryPeriod type=int minimum amount of time allowed between subsequent broadcasts |
void |
setCoalitionDecayStrategy(DecayStrategy coalitionDecayStrategy)
Sets the DecayStrategy used by Coalition objects in this module |
void |
setCoalitionRemovalThreshold(double coalitionRemovalThreshold)
Sets coalition removal threshold |
void |
setRefractoryPeriod(int period)
Sets refractoryPeriod |
void |
triggerBroadcast(BroadcastTrigger trigger)
Listener must trigger a competition for consciousness and a conscious broadcast of the winner |
| 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 GlobalWorkspaceImpl()
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class InitializableImplInitializablepublic void addListener(ModuleListener listener)
FrameworkModuleImpl
addListener in interface FrameworkModuleaddListener in class FrameworkModuleImpllistener - - listener of this FrameworkModulepublic void addBroadcastListener(BroadcastListener bl)
GlobalWorkspaceBroadcastListener. Each registered
BroadcastListener receives each conscious broadcast.
addBroadcastListener in interface GlobalWorkspacebl - the BroadcastListener that will be registeredpublic void addBroadcastTrigger(BroadcastTrigger t)
GlobalWorkspaceBroadcastTrigger
addBroadcastTrigger in interface GlobalWorkspacet - a BroadcastTrigger which can initiate a broadcastpublic boolean addCoalition(Coalition coalition)
GlobalWorkspaceCoalition
addCoalition in interface GlobalWorkspacecoalition - the Coalition to be added to the GlobalWorkspace
public void triggerBroadcast(BroadcastTrigger trigger)
TriggerListener
triggerBroadcast in interface TriggerListenertrigger - trigger that is initiating the broadcastpublic java.lang.Object getModuleContent(java.lang.Object... params)
FrameworkModuleImpl
getModuleContent in interface FrameworkModulegetModuleContent in class FrameworkModuleImplparams - parameters specifying what content will be returned
public void decayModule(long ticks)
FrameworkModule
decayModule in interface FrameworkModuleticks - number of ticks to decay.public long getBroadcastSentCount()
GlobalWorkspace
getBroadcastSentCount in interface GlobalWorkspacepublic int getRefractoryPeriod()
getRefractoryPeriod in interface RefractoryPeriodTaskManagerpublic long getTickAtLastBroadcast()
GlobalWorkspace
getTickAtLastBroadcast in interface GlobalWorkspacepublic void setRefractoryPeriod(int period)
setRefractoryPeriod in interface RefractoryPeriodperiod - number of ticks that must pass after a broadcast has been
sent before a new one can be sent.TaskManagerpublic double getCoalitionRemovalThreshold()
GlobalWorkspace
getCoalitionRemovalThreshold in interface GlobalWorkspaceCoalition to remain in the modulepublic void setCoalitionRemovalThreshold(double coalitionRemovalThreshold)
GlobalWorkspace
setCoalitionRemovalThreshold in interface GlobalWorkspacecoalitionRemovalThreshold - lower bound of activation for a Coalition to remain in the modulepublic DecayStrategy getCoalitionDecayStrategy()
GlobalWorkspaceDecayStrategy used by Coalition objects in this module
getCoalitionDecayStrategy in interface GlobalWorkspaceDecayStrategy by which coalitions will be decayed.public void setCoalitionDecayStrategy(DecayStrategy coalitionDecayStrategy)
GlobalWorkspaceDecayStrategy used by Coalition objects in this module
setCoalitionDecayStrategy in interface GlobalWorkspacecoalitionDecayStrategy - the DecayStrategy used to decay coalition objects
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||