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,
Action 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,
Action 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, Action ga)
LearningRate
peekAtLearningRate
in interface LearningRate
s
- 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, Action ga)
LearningRate
pollLearningRate
in interface LearningRate
agentTime
- 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()
LearningRate
resetDecay
in interface LearningRate
public double peekAtLearningRate(int featureId)
LearningRate
peekAtLearningRate
in interface LearningRate
featureId
- the state feature for which the learning rate should be returnedpublic double pollLearningRate(int agentTime, int featureId)
LearningRate
pollLearningRate
in interface LearningRate
agentTime
- the time index of the agent when polling.featureId
- the state feature for which the learning rate should be returned