public static class InvertedPendulum.InvertedPendulumRewardFunction extends java.lang.Object implements RewardFunction
| Constructor and Description |
|---|
InvertedPendulum.InvertedPendulumRewardFunction() |
InvertedPendulum.InvertedPendulumRewardFunction(double maxAbsoluteAngle)
Initializes with a max pole angle as specified in radians
|
| Modifier and Type | Method and Description |
|---|---|
double |
reward(State s,
GroundedAction a,
State sprime)
Returns the reward received when action a is executed in state s and the agent transitions to state sprime.
|
public InvertedPendulum.InvertedPendulumRewardFunction()
public InvertedPendulum.InvertedPendulumRewardFunction(double maxAbsoluteAngle)
maxAbsoluteAngle - the maximum pole angle in radians that causes task termination/failure.public double reward(State s, GroundedAction a, State sprime)
RewardFunctionreward in interface RewardFunctions - the state in which the action was executeda - the action executedsprime - the state to which the agent transitioned