public class VanillaDiffVinit extends java.lang.Object implements DifferentiableVInit
DifferentiableVInit.ParamedDiffVInit
ValueFunctionInitialization.ConstantValueFunctionInitialization
Modifier and Type | Field and Description |
---|---|
protected DifferentiableRF |
rf
The differentiable reward function that defines the parameter space over which this value function
initialization must differentiate.
|
protected ValueFunctionInitialization |
vinit
The source value function initialization.
|
Constructor and Description |
---|
VanillaDiffVinit(ValueFunctionInitialization vinit,
DifferentiableRF rf)
Initializes.
|
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.
|
protected ValueFunctionInitialization vinit
protected DifferentiableRF rf
public VanillaDiffVinit(ValueFunctionInitialization vinit, DifferentiableRF rf)
vinit
- The vanilla unparameterized value function initializationrf
- the differentiable reward function that defines the total parameter spacepublic double[] getVGradient(State s)
DifferentiableVInit
getVGradient
in interface DifferentiableVInit
s
- the state on which the value function is to be evaluatedpublic double[] getQGradient(State s, AbstractGroundedAction ga)
DifferentiableVInit
getQGradient
in interface DifferentiableVInit
s
- 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)
ValueFunction
value
in interface ValueFunction
s
- the state to evaluate.public double qValue(State s, AbstractGroundedAction a)
ValueFunctionInitialization
qValue
in interface ValueFunctionInitialization
s
- 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.