public class DenseStateActionLinearVFA extends java.lang.Object implements DifferentiableStateActionValue
ParametricFunction.ParametricStateActionFunction, ParametricFunction.ParametricStateFunction| Modifier and Type | Field and Description |
|---|---|
protected double[] |
currentFeatures |
protected FunctionGradient |
currentGradient |
protected double |
currentValue |
protected double |
defaultWeight
A default weight value for the functions weights.
|
protected DenseStateActionFeatures |
features |
protected State |
lastState |
protected double[] |
stateActionWeights
The function weights when performing Q-value function approximation.
|
| Constructor and Description |
|---|
DenseStateActionLinearVFA(DenseStateActionFeatures features,
double defaultWeight) |
DenseStateActionLinearVFA(DenseStateActionFeatures features,
double[] stateActionWeights,
double defaultWeight) |
| Modifier and Type | Method and Description |
|---|---|
DenseStateActionLinearVFA |
copy()
Returns a copy of this
ParametricFunction. |
double |
evaluate(State s,
Action a)
|
double |
getParameter(int i)
Returns the value of the ith parameter value
|
FunctionGradient |
gradient(State s,
Action a)
Returns the gradient of this function.
|
int |
numParameters()
Returns the number of parameters defining this function.
|
void |
resetParameters()
Resets the parameters of this function to default values.
|
void |
setParameter(int i,
double p)
Sets the value of the ith parameter to given value
|
protected DenseStateActionFeatures features
protected double[] stateActionWeights
protected double defaultWeight
protected double[] currentFeatures
protected double currentValue
protected FunctionGradient currentGradient
protected State lastState
public DenseStateActionLinearVFA(DenseStateActionFeatures features, double defaultWeight)
public DenseStateActionLinearVFA(DenseStateActionFeatures features, double[] stateActionWeights, double defaultWeight)
public FunctionGradient gradient(State s, Action a)
DifferentiableStateActionValuegradient in interface DifferentiableStateActionValues - the input Statea - the input ActionFunctionGradient of this function at the inputpublic double evaluate(State s, Action a)
ParametricFunction.ParametricStateActionFunctionevaluate in interface ParametricFunction.ParametricStateActionFunctions - the input Statea - the input actionState and Actionpublic int numParameters()
ParametricFunctionnumParameters in interface ParametricFunctionpublic double getParameter(int i)
ParametricFunctiongetParameter in interface ParametricFunctioni - the parameter indexpublic void setParameter(int i,
double p)
ParametricFunctionsetParameter in interface ParametricFunctioni - the index of the parameter to setp - the parameter value to which it should be setpublic void resetParameters()
ParametricFunctionresetParameters in interface ParametricFunctionpublic DenseStateActionLinearVFA copy()
ParametricFunctionParametricFunction.copy in interface ParametricFunctionParametricFunction.