public class UniformPlusGoalRF extends java.lang.Object implements RewardFunction
| Modifier and Type | Field and Description |
|---|---|
protected StateConditionTest |
gc |
| Constructor and Description |
|---|
UniformPlusGoalRF(StateConditionTest gc)
Sets the reward function to return 0 when transition to states that satisfy gc, and -1 otherwise
|
| 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.
|
protected StateConditionTest gc
public UniformPlusGoalRF(StateConditionTest gc)
gc - when gc returns true, it indicates a goal state.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