edu.memphis.ccrg.lida.framework.strategies
Class SigmoidDecayStrategy
java.lang.Object
edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
edu.memphis.ccrg.lida.framework.strategies.StrategyImpl
edu.memphis.ccrg.lida.framework.strategies.SigmoidDecayStrategy
- All Implemented Interfaces:
- Initializable, DecayStrategy, Strategy
public class SigmoidDecayStrategy
- extends StrategyImpl
- implements DecayStrategy
Default implementation of sigmoid decay. Uses two parameters in activation calculation.
Can pass these parameters when the strategy is initialized. (see factoriesData.xml).
Alternatively, parameters can be passed in the decay method call.
Formula used: 1 / (1 + exp(-a* x + c))
- Author:
- Javier Snaider, Ryan J. McCall
|
Method Summary |
double |
decay(double currentActivation,
long ticks,
java.util.Map<java.lang.String,? extends java.lang.Object> params)
Decays the current activation according to some internal decay function. |
double |
decay(double currentActivation,
long ticks,
java.lang.Object... params)
Decays the current activation according to some internal decay function. |
void |
init()
If this method is overridden, this init() must be called first! i.e. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SigmoidDecayStrategy
public SigmoidDecayStrategy()
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:
a slope component of the decay function's linear scaling, 1 / (1 + exp(-a* x + c))
c intercept component of the decay function's linear scaling, 1 / (1 + exp(-a* x + c))
If any parameter is not specified its default value will be used.
- Specified by:
init in interface Initializable- Overrides:
init in class InitializableImpl
- See Also:
Initializable
decay
public double decay(double currentActivation,
long ticks,
java.lang.Object... params)
- Decays the current activation according to some internal decay function.
- Specified by:
decay in interface DecayStrategy
- Parameters:
currentActivation - activation of the entity before decay.ticks - The number of ticks to decay.params - optionally accepts 2 double parameters of sigmoid activation calculation.
- Returns:
- new activation
decay
public double decay(double currentActivation,
long ticks,
java.util.Map<java.lang.String,? extends java.lang.Object> params)
- Decays the current activation according to some internal decay function.
- Specified by:
decay in interface DecayStrategy
- Parameters:
currentActivation - activation of the entity before decay.ticks - how much time has passed since last decayparams - optionally accepts 2 parameters of sigmoid activation calculation.
- Returns:
- new activation amount