edu.memphis.ccrg.lida.attentioncodelets
Class AttentionCodeletImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
      extended by edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
          extended by edu.memphis.ccrg.lida.framework.shared.activation.LearnableImpl
              extended by edu.memphis.ccrg.lida.framework.tasks.FrameworkTaskImpl
                  extended by edu.memphis.ccrg.lida.framework.tasks.CodeletImpl
                      extended by edu.memphis.ccrg.lida.attentioncodelets.AttentionCodeletImpl
All Implemented Interfaces:
AttentionCodelet, FullyInitializable, Initializable, Activatible, Learnable, RefractoryPeriod, Codelet, FrameworkTask, java.util.concurrent.Callable<FrameworkTask>
Direct Known Subclasses:
BasicAttentionCodelet, DefaultAttentionCodelet

public abstract class AttentionCodeletImpl
extends CodeletImpl
implements AttentionCodelet

Abstract implementation of AttentionCodelet that checks the CSM for desired content. If this is found it creates a Coalition and adds it to the GlobalWorkspace.

Author:
Ryan J. McCall

Field Summary
protected  WorkspaceBuffer currentSituationalModel
          Where codelet will look for and retrieve sought content from
protected  GlobalWorkspace globalWorkspace
          where Coalitions will be added
 
Fields inherited from class edu.memphis.ccrg.lida.framework.tasks.CodeletImpl
soughtContent
 
Fields inherited from class edu.memphis.ccrg.lida.framework.tasks.FrameworkTaskImpl
status
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable
DEFAULT_BASE_LEVEL_ACTIVATION, DEFAULT_LEARNABLE_REMOVAL_THRESHOLD
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
DEFAULT_ACTIVATIBLE_REMOVAL_THRESHOLD, DEFAULT_ACTIVATION
 
Constructor Summary
AttentionCodeletImpl()
           
 
Method Summary
 int getRefractoryPeriod()
          Gets refractoryPeriod
 void init()
          If this method is overridden, this init must be called first! i.e.
protected  void runThisFrameworkTask()
          If sought content is found it the CSM, then retrieve it and create a coalition from it finally adding it to the GlobalWorkspace.
 void setAssociatedModule(FrameworkModule module, java.lang.String usage)
          Subclasses may override this method.
 void setRefractoryPeriod(int ticks)
          Sets refractoryPeriod
 
Methods inherited from class edu.memphis.ccrg.lida.framework.tasks.CodeletImpl
getSoughtContent, setSoughtContent
 
Methods inherited from class edu.memphis.ccrg.lida.framework.tasks.FrameworkTaskImpl
call, cancel, equals, getControllingTaskSpawner, getNextTicksPerRun, getScheduledTick, getTaskId, getTaskStatus, getTicksPerRun, hashCode, setControllingTaskSpawner, setNextTicksPerRun, setScheduledTick, setTaskStatus, setTicksPerRun, stopRunning, toString
 
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.LearnableImpl
decay, decayBaseLevelActivation, getBaseLevelActivation, getBaseLevelDecayStrategy, getBaseLevelExciteStrategy, getLearnableRemovalThreshold, getTotalActivation, getTotalActivationStrategy, isRemovable, reinforceBaseLevelActivation, setBaseLevelActivation, setBaseLevelDecayStrategy, setBaseLevelExciteStrategy, setBaseLevelRemovalThreshold, setTotalActivationStrategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
containsParameter, getParam, getParameters, init
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.tasks.Codelet
bufferContainsSoughtContent, getSoughtContent, retrieveWorkspaceContent, setSoughtContent
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.tasks.FrameworkTask
cancel, getControllingTaskSpawner, getNextTicksPerRun, getScheduledTick, getTaskId, getTaskStatus, getTicksPerRun, setControllingTaskSpawner, setNextTicksPerRun, setScheduledTick, setTaskStatus, setTicksPerRun, stopRunning
 
Methods inherited from interface java.util.concurrent.Callable
call
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable
decayBaseLevelActivation, getBaseLevelActivation, getBaseLevelDecayStrategy, getBaseLevelExciteStrategy, getLearnableRemovalThreshold, getTotalActivationStrategy, reinforceBaseLevelActivation, setBaseLevelActivation, setBaseLevelDecayStrategy, setBaseLevelExciteStrategy, setBaseLevelRemovalThreshold, setTotalActivationStrategy
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
containsParameter, getParam, getParameters, init
 

Field Detail

currentSituationalModel

protected WorkspaceBuffer currentSituationalModel
Where codelet will look for and retrieve sought content from


globalWorkspace

protected GlobalWorkspace globalWorkspace
where Coalitions will be added

Constructor Detail

AttentionCodeletImpl

public AttentionCodeletImpl()
Method Detail

init

public void init()
If this method is overridden, this init must be called first! i.e. super.init(); Will set parameters with the following names:

refractoryPeriod period in ticks that will pass after this codelet creates a coaltion before it can create another

If any parameter is not specified its default value will be used.

Specified by:
init in interface Initializable
Overrides:
init in class LearnableImpl
See Also:
LearnableImpl.init()

setAssociatedModule

public void setAssociatedModule(FrameworkModule module,
                                java.lang.String usage)
Description copied from class: FrameworkTaskImpl
Subclasses may override this method.

Specified by:
setAssociatedModule in interface FullyInitializable
Overrides:
setAssociatedModule in class FrameworkTaskImpl
Parameters:
module - the module to be associated.
usage - how module will be used
See Also:
ModuleUsage

runThisFrameworkTask

protected void runThisFrameworkTask()
If sought content is found it the CSM, then retrieve it and create a coalition from it finally adding it to the GlobalWorkspace.

Specified by:
runThisFrameworkTask in class FrameworkTaskImpl

setRefractoryPeriod

public void setRefractoryPeriod(int ticks)
Description copied from interface: RefractoryPeriod
Sets refractoryPeriod

Specified by:
setRefractoryPeriod in interface RefractoryPeriod
Parameters:
ticks - length of refractory period in ticks
See Also:
TaskManager

getRefractoryPeriod

public int getRefractoryPeriod()
Description copied from interface: RefractoryPeriod
Gets refractoryPeriod

Specified by:
getRefractoryPeriod in interface RefractoryPeriod
Returns:
length of refractory period in ticks
See Also:
TaskManager