edu.memphis.ccrg.lida.attentioncodelets
Class DefaultAttentionCodelet

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
                          extended by edu.memphis.ccrg.lida.attentioncodelets.DefaultAttentionCodelet
All Implemented Interfaces:
AttentionCodelet, FullyInitializable, Initializable, Activatible, Learnable, RefractoryPeriod, Codelet, FrameworkTask, java.util.concurrent.Callable<FrameworkTask>
Direct Known Subclasses:
NeighborhoodAttentionCodelet

public class DefaultAttentionCodelet
extends AttentionCodeletImpl

Default AttentionCodelet which seeks to create a Coalition from the most activate content above a threshold.

Author:
Ryan J. McCall

Field Summary
protected  double attentionThreshold
          Activation which content must have in order to be added to the Coalition
protected  int retrievalDepth
          Depth of content, beyond the sought content, the attention codelet will add to a Coalition.
 
Fields inherited from class edu.memphis.ccrg.lida.attentioncodelets.AttentionCodeletImpl
currentSituationalModel, globalWorkspace
 
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
DefaultAttentionCodelet()
           
 
Method Summary
 boolean bufferContainsSoughtContent(WorkspaceBuffer buffer)
          Returns true if specified buffer contains at least one node above attentionThreshold.
 void init()
          If this method is overridden, this init() must be called first! i.e.
 NodeStructure retrieveWorkspaceContent(WorkspaceBuffer buffer)
          Returns a the most active WorkspaceContent and possibly neighboring content as specified by retrievalDepths
 
Methods inherited from class edu.memphis.ccrg.lida.attentioncodelets.AttentionCodeletImpl
getRefractoryPeriod, runThisFrameworkTask, setAssociatedModule, setRefractoryPeriod
 
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
getSoughtContent, 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

attentionThreshold

protected double attentionThreshold
Activation which content must have in order to be added to the Coalition


retrievalDepth

protected int retrievalDepth
Depth of content, beyond the sought content, the attention codelet will add to a Coalition. Currently only supported for one level beyond sought content.

Constructor Detail

DefaultAttentionCodelet

public DefaultAttentionCodelet()
Method Detail

init

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

attentionThreshold threshold content must have to be added to a Coalition
retrievalDepth depth of neighboring nodes retrieved from most active content

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

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

bufferContainsSoughtContent

public boolean bufferContainsSoughtContent(WorkspaceBuffer buffer)
Returns true if specified buffer contains at least one node above attentionThreshold. Sets the most activated node as the codelet's new sought content

Parameters:
buffer - the WorkspaceBuffer to be checked for content
Returns:
true, if successful

retrieveWorkspaceContent

public NodeStructure retrieveWorkspaceContent(WorkspaceBuffer buffer)
Returns a the most active WorkspaceContent and possibly neighboring content as specified by retrievalDepths

Parameters:
buffer - the buffer
Returns:
the workspace content