public class LinearStateDiffVF extends DifferentiableVInit.ParamedDiffVInit
MLIRL.DifferentiableVInit.ParamedDiffVInitValueFunctionInitialization.ConstantValueFunctionInitialization| Modifier and Type | Field and Description |
|---|---|
protected StateToFeatureVectorGenerator |
fvgen
The state feature vector generator over which the linear function operates
|
dim, parameters| Constructor and Description |
|---|
LinearStateDiffVF(StateToFeatureVectorGenerator fvgen,
int dim)
Initializes with the state feature vector generator over which the linear function is defined and the dimensionality of it.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
getQGradient(State s,
AbstractGroundedAction ga)
Returns the Q-value function gradient.
|
double[] |
getVGradient(State s)
Returns the value function gradient.
|
double |
qValue(State s,
AbstractGroundedAction a)
Returns the initialization value of the Q-value function for a given state and action pair.
|
double |
value(State s)
Returns the value function evaluation of the given state.
|
getParameterDimension, getParameters, randomizeParameters, setParameter, setParametersprotected StateToFeatureVectorGenerator fvgen
public LinearStateDiffVF(StateToFeatureVectorGenerator fvgen, int dim)
fvgen - the state feature vector generator over which the linear function is defined.dim - the dimensionality of the feature vector/parameterspublic double[] getVGradient(State s)
DifferentiableVInits - the state on which the value function is to be evaluatedpublic double[] getQGradient(State s, AbstractGroundedAction ga)
DifferentiableVInits - the state on which the Q-value is to be evaluated.ga - the action on which the Q-value is to be evaluated.public double value(State s)
ValueFunctions - the state to evaluate.public double qValue(State s, AbstractGroundedAction a)
ValueFunctionInitializations - the state for which to get the initial value of the Q-value function.a - the action for which to get the initial value of the Q-value function.