edu.memphis.ccrg.lida.framework.shared.activation
Class ActivatibleImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
      extended by edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
All Implemented Interfaces:
Initializable, Activatible
Direct Known Subclasses:
BehaviorImpl, CoalitionImpl, LearnableImpl, LinkImpl, NodeImpl

public class ActivatibleImpl
extends InitializableImpl
implements Activatible

Generic Activatible Implementation. Useful for classes to extend from it, e.g. Node and Codelet.

Author:
Javier Snaider

Field Summary
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
DEFAULT_ACTIVATIBLE_REMOVAL_THRESHOLD, DEFAULT_ACTIVATION
 
Constructor Summary
ActivatibleImpl()
          Default constructor
ActivatibleImpl(double activation, double removalThreshold, ExciteStrategy excite, DecayStrategy decay)
          Deprecated. To be removed in the future.
 
Method Summary
 void decay(long ticks)
          decay the current activation using the decay strategy.
 void excite(double excitation)
          The current activation of this node is increased using the excitation value as a parameter for the ExciteStrategy
 double getActivatibleRemovalThreshold()
          Gets activatibleRemovalThreshold
 double getActivation()
          Returns the current activation of this activatible
 DecayStrategy getDecayStrategy()
          Gets the decay strategy
 ExciteStrategy getExciteStrategy()
          Gets the excite strategy
 double getTotalActivation()
          Returns the total activation of this activatible
 boolean isRemovable()
          Returns true if this Activatible is removable
 void setActivatibleRemovalThreshold(double threshold)
          Sets activatibleRemovalThreshold
 void setActivation(double a)
          Set the current activation.
 void setDecayStrategy(DecayStrategy s)
          Sets the decay strategy
 void setExciteStrategy(ExciteStrategy s)
          Sets the excite strategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
containsParameter, getParam, getParameters, init, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
containsParameter, getParam, getParameters, init, init
 

Constructor Detail

ActivatibleImpl

public ActivatibleImpl()
Default constructor


ActivatibleImpl

@Deprecated
public ActivatibleImpl(double activation,
                                  double removalThreshold,
                                  ExciteStrategy excite,
                                  DecayStrategy decay)
Deprecated. To be removed in the future.

Parameters:
activation - initial activation
removalThreshold - initial removableThreshold
excite - ExciteStrategy
decay - DecayStrategy
Method Detail

decay

public void decay(long ticks)
Description copied from interface: Activatible
decay the current activation using the decay strategy. The decay depends on the time since the last decaying. It is indicated by the parameter ticks.

Specified by:
decay in interface Activatible
Parameters:
ticks - the number of ticks to decay

excite

public void excite(double excitation)
Description copied from interface: Activatible
The current activation of this node is increased using the excitation value as a parameter for the ExciteStrategy

Specified by:
excite in interface Activatible
Parameters:
excitation - the value to be used to increase the current activation of this node

getActivation

public double getActivation()
Description copied from interface: Activatible
Returns the current activation of this activatible

Specified by:
getActivation in interface Activatible
Returns:
the current activation.

getActivatibleRemovalThreshold

public double getActivatibleRemovalThreshold()
Description copied from interface: Activatible
Gets activatibleRemovalThreshold

Specified by:
getActivatibleRemovalThreshold in interface Activatible
Returns:
threshold for removal of this activatible

getDecayStrategy

public DecayStrategy getDecayStrategy()
Description copied from interface: Activatible
Gets the decay strategy

Specified by:
getDecayStrategy in interface Activatible
Returns:
the decay strategy.

getExciteStrategy

public ExciteStrategy getExciteStrategy()
Description copied from interface: Activatible
Gets the excite strategy

Specified by:
getExciteStrategy in interface Activatible
Returns:
the excite strategy

setActivation

public void setActivation(double a)
Description copied from interface: Activatible
Set the current activation. Used for initialization, not during regular execution, use excite instead.

Specified by:
setActivation in interface Activatible
Parameters:
a - new activation

setActivatibleRemovalThreshold

public void setActivatibleRemovalThreshold(double threshold)
Description copied from interface: Activatible
Sets activatibleRemovalThreshold

Specified by:
setActivatibleRemovalThreshold in interface Activatible
Parameters:
threshold - threshold for removal of this activatible

setDecayStrategy

public void setDecayStrategy(DecayStrategy s)
Description copied from interface: Activatible
Sets the decay strategy

Specified by:
setDecayStrategy in interface Activatible
Parameters:
s - the decay strategy for the current activation.

setExciteStrategy

public void setExciteStrategy(ExciteStrategy s)
Description copied from interface: Activatible
Sets the excite strategy

Specified by:
setExciteStrategy in interface Activatible
Parameters:
s - the Excite strategy for the current activation.

getTotalActivation

public double getTotalActivation()
Description copied from interface: Activatible
Returns the total activation of this activatible

Specified by:
getTotalActivation in interface Activatible
Returns:
The total activation. It should return the current activation if no base activation is used.

isRemovable

public boolean isRemovable()
Description copied from interface: Activatible
Returns true if this Activatible is removable

Specified by:
isRemovable in interface Activatible
Returns:
true if activation is less than activatibleRemovalThreshold