public class ConstantLR extends java.lang.Object implements LearningRate
| Modifier and Type | Field and Description |
|---|---|
double |
learningRate |
| Constructor and Description |
|---|
ConstantLR()
Constructs constant learning rate of 0.1
|
ConstantLR(java.lang.Double learningRate)
Constructs a constant learning rate for the given value
|
| Modifier and Type | Method and Description |
|---|---|
double |
peekAtLearningRate(int featureId)
A method for looking at the current learning rate for a state (-action) feature without having it altered.
|
double |
peekAtLearningRate(State s,
AbstractGroundedAction ga)
A method for looking at the current learning rate for a state-action pair without having it altered.
|
double |
pollLearningRate(int agentTime,
int featureId)
A method for returning the learning rate for a given state (-action) feature and then decaying the learning rate as defined by this class.
|
double |
pollLearningRate(int agentTime,
State s,
AbstractGroundedAction ga)
A method for returning the learning rate for a given state action pair and then decaying the learning rate as defined by this class.
|
void |
resetDecay()
Causes any learnign rate decay to reset to where it started.
|
public ConstantLR()
public ConstantLR(java.lang.Double learningRate)
learningRate - the constant learning rate to usepublic double peekAtLearningRate(State s, AbstractGroundedAction ga)
LearningRatepeekAtLearningRate in interface LearningRates - the state for which the learning rate should be returnedga - the action from which the learning rate should be returnedpublic double pollLearningRate(int agentTime,
State s,
AbstractGroundedAction ga)
LearningRatepollLearningRate in interface LearningRateagentTime - the time index of the agent when polling.s - the state for which the learning rate should be returnedga - the action from which the learning rate should be returnedpublic void resetDecay()
LearningRateresetDecay in interface LearningRatepublic double peekAtLearningRate(int featureId)
LearningRatepeekAtLearningRate in interface LearningRatefeatureId - the state feature for which the learning rate should be returnedpublic double pollLearningRate(int agentTime,
int featureId)
LearningRatepollLearningRate in interface LearningRateagentTime - the time index of the agent when polling.featureId - the state feature for which the learning rate should be returned