|
||||||||||
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 Initializable
init
in class InitializableImpl
Initializable
public void addListener(ModuleListener listener)
FrameworkModuleImpl
addListener
in interface FrameworkModule
addListener
in class FrameworkModuleImpl
listener
- - listener of this FrameworkModulepublic void addBroadcastListener(BroadcastListener bl)
GlobalWorkspace
BroadcastListener
. Each registered
BroadcastListener
receives each conscious broadcast.
addBroadcastListener
in interface GlobalWorkspace
bl
- the BroadcastListener
that will be registeredpublic void addBroadcastTrigger(BroadcastTrigger t)
GlobalWorkspace
BroadcastTrigger
addBroadcastTrigger
in interface GlobalWorkspace
t
- a BroadcastTrigger
which can initiate a broadcastpublic boolean addCoalition(Coalition coalition)
GlobalWorkspace
Coalition
addCoalition
in interface GlobalWorkspace
coalition
- the Coalition
to be added to the GlobalWorkspace
public void triggerBroadcast(BroadcastTrigger trigger)
TriggerListener
triggerBroadcast
in interface TriggerListener
trigger
- trigger that is initiating the broadcastpublic java.lang.Object getModuleContent(java.lang.Object... params)
FrameworkModuleImpl
getModuleContent
in interface FrameworkModule
getModuleContent
in class FrameworkModuleImpl
params
- parameters specifying what content will be returned
public void decayModule(long ticks)
FrameworkModule
decayModule
in interface FrameworkModule
ticks
- number of ticks to decay.public long getBroadcastSentCount()
GlobalWorkspace
getBroadcastSentCount
in interface GlobalWorkspace
public int getRefractoryPeriod()
getRefractoryPeriod
in interface RefractoryPeriod
TaskManager
public long getTickAtLastBroadcast()
GlobalWorkspace
getTickAtLastBroadcast
in interface GlobalWorkspace
public void setRefractoryPeriod(int period)
setRefractoryPeriod
in interface RefractoryPeriod
period
- number of ticks that must pass after a broadcast has been
sent before a new one can be sent.TaskManager
public double getCoalitionRemovalThreshold()
GlobalWorkspace
getCoalitionRemovalThreshold
in interface GlobalWorkspace
Coalition
to remain in the modulepublic void setCoalitionRemovalThreshold(double coalitionRemovalThreshold)
GlobalWorkspace
setCoalitionRemovalThreshold
in interface GlobalWorkspace
coalitionRemovalThreshold
- lower bound of activation for a Coalition
to remain in the modulepublic DecayStrategy getCoalitionDecayStrategy()
GlobalWorkspace
DecayStrategy
used by Coalition
objects in this module
getCoalitionDecayStrategy
in interface GlobalWorkspace
DecayStrategy
by which coalitions will be decayed.public void setCoalitionDecayStrategy(DecayStrategy coalitionDecayStrategy)
GlobalWorkspace
DecayStrategy
used by Coalition
objects in this module
setCoalitionDecayStrategy
in interface GlobalWorkspace
coalitionDecayStrategy
- the DecayStrategy
used to decay coalition objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |