edu.memphis.ccrg.lida.proceduralmemory
Class SchemeImpl

java.lang.Object
  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.proceduralmemory.SchemeImpl
All Implemented Interfaces:
Activatible, Learnable, Scheme, java.io.Serializable

public class SchemeImpl
extends LearnableImpl
implements Scheme

Default implementation of Scheme

Author:
Ryan J. McCall, Javier Snaider
See Also:
Serialized Form

Field Summary
 
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
SchemeImpl()
          Constructs a new scheme with default values
SchemeImpl(java.lang.String label, Action a)
          Constructs a new scheme with specified label and action
 
Method Summary
 void actionExecuted()
          Called when Scheme's action is executed Scheme should update the number of times its action has been executed in order to calculate reliability.
 void actionSuccessful()
          Called when Scheme's action produces expected result.
 boolean equals(java.lang.Object o)
           
 Action getAction()
          Gets action.
 NodeStructure getAddingResult()
          Returns addingResult.
 NodeStructure getContext()
          Gets context.
 NodeStructure getDeletingResult()
          Returns deletingResult.
 int getExecutions()
          Gets the number of executions
 long getId()
          Gets scheme's id.
 Behavior getInstantiation()
          Instantiates and returns a Behavior based on this Scheme
 java.lang.String getLabel()
          Gets label.
 double getReliability()
          Returns reliability
 double getReliabilityThreshold()
          Gets reliabilityThreshold
 int hashCode()
           
 boolean isInnate()
           
 boolean isReliable()
           
 void setAction(Action action)
          Sets scheme Action.
 void setAddingResult(NodeStructure ns)
          Sets addingResult.
 void setContext(NodeStructure ns)
          Sets context.
 void setDeletingResult(NodeStructure ns)
          Sets deletingResult.
 void setInnate(boolean innate)
          Sets innate
 void setLabel(java.lang.String label)
          Sets label.
 void setReliabilityThreshold(double threshold)
          Sets reliabilityThreshold
 java.lang.String 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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

SchemeImpl

public SchemeImpl()
Constructs a new scheme with default values


SchemeImpl

public SchemeImpl(java.lang.String label,
                  Action a)
Constructs a new scheme with specified label and action

Parameters:
label - Scheme's name
a - scheme's Action
Method Detail

actionExecuted

public void actionExecuted()
Description copied from interface: Scheme
Called when Scheme's action is executed Scheme should update the number of times its action has been executed in order to calculate reliability.

Specified by:
actionExecuted in interface Scheme

actionSuccessful

public void actionSuccessful()
Description copied from interface: Scheme
Called when Scheme's action produces expected result.

Specified by:
actionSuccessful in interface Scheme

getReliability

public double getReliability()
Description copied from interface: Scheme
Returns reliability

Specified by:
getReliability in interface Scheme
Returns:
frequency that result is observed after scheme's Action is taken.

isReliable

public boolean isReliable()
Specified by:
isReliable in interface Scheme
Returns:
true if reliability is over threshold

getInstantiation

public Behavior getInstantiation()
Description copied from interface: Scheme
Instantiates and returns a Behavior based on this Scheme

Specified by:
getInstantiation in interface Scheme
Returns:
an instantiation of this scheme

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setInnate

public void setInnate(boolean innate)
Description copied from interface: Scheme
Sets innate

Specified by:
setInnate in interface Scheme
Parameters:
innate - whether this Scheme is hard-wired and cannot be decayed.

isInnate

public boolean isInnate()
Specified by:
isInnate in interface Scheme
Returns:
true if this scheme should not be decayed.

setAction

public void setAction(Action action)
Description copied from interface: Scheme
Sets scheme Action.

Specified by:
setAction in interface Scheme
Parameters:
action - Action

getLabel

public java.lang.String getLabel()
Description copied from interface: Scheme
Gets label.

Specified by:
getLabel in interface Scheme
Returns:
human-readable label

setLabel

public void setLabel(java.lang.String label)
Description copied from interface: Scheme
Sets label.

Specified by:
setLabel in interface Scheme
Parameters:
label - human-readable label

getDeletingResult

public NodeStructure getDeletingResult()
Description copied from interface: Scheme
Returns deletingResult.

Specified by:
getDeletingResult in interface Scheme
Returns:
NodeStructure representing what this scheme's action should delete if executed.

setDeletingResult

public void setDeletingResult(NodeStructure ns)
Description copied from interface: Scheme
Sets deletingResult.

Specified by:
setDeletingResult in interface Scheme
Parameters:
ns - NodeStructure representing what this scheme's action should delete if executed.

setAddingResult

public void setAddingResult(NodeStructure ns)
Description copied from interface: Scheme
Sets addingResult.

Specified by:
setAddingResult in interface Scheme
Parameters:
ns - NodeStructure representing what this scheme's action should add if executed.

getContext

public NodeStructure getContext()
Description copied from interface: Scheme
Gets context.

Specified by:
getContext in interface Scheme
Returns:
context in which this scheme is activated.

setContext

public void setContext(NodeStructure ns)
Description copied from interface: Scheme
Sets context.

Specified by:
setContext in interface Scheme
Parameters:
ns - context in which this scheme is activated.

getId

public long getId()
Description copied from interface: Scheme
Gets scheme's id.

Specified by:
getId in interface Scheme
Returns:
unique identifier for this scheme

getExecutions

public int getExecutions()
Description copied from interface: Scheme
Gets the number of executions

Specified by:
getExecutions in interface Scheme
Returns:
how many times this scheme's action has been executed

getAddingResult

public NodeStructure getAddingResult()
Description copied from interface: Scheme
Returns addingResult.

Specified by:
getAddingResult in interface Scheme
Returns:
NodeStructure representing what this scheme's action should add if executed.

getAction

public Action getAction()
Description copied from interface: Scheme
Gets action.

Specified by:
getAction in interface Scheme
Returns:
scheme's action in SensoryMotorMemory

getReliabilityThreshold

public double getReliabilityThreshold()
Description copied from interface: Scheme
Gets reliabilityThreshold

Specified by:
getReliabilityThreshold in interface Scheme
Returns:
threshold of reliability

setReliabilityThreshold

public void setReliabilityThreshold(double threshold)
Description copied from interface: Scheme
Sets reliabilityThreshold

Specified by:
setReliabilityThreshold in interface Scheme
Parameters:
threshold - threshold of reliability

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object