public abstract class ShapedRewardFunction extends java.lang.Object implements RewardFunction
Modifier and Type | Field and Description |
---|---|
protected RewardFunction |
baseRF
The base objective reward function for the task.
|
Constructor and Description |
---|
ShapedRewardFunction(RewardFunction baseRF)
Initializes with the base objective task reward function.
|
Modifier and Type | Method and Description |
---|---|
abstract double |
additiveReward(State s,
Action a,
State sprime)
Returns the reward value to add to the base objective reward function.
|
double |
reward(State s,
Action a,
State sprime)
Returns the reward received when action a is executed in state s and the agent transitions to state sprime.
|
protected RewardFunction baseRF
public ShapedRewardFunction(RewardFunction baseRF)
baseRF
- the objective task reward function.public abstract double additiveReward(State s, Action a, State sprime)
s
- the previous statea
- the action taken the previous statesprime
- the successor statepublic double reward(State s, Action a, State sprime)
RewardFunction
reward
in interface RewardFunction
s
- the state in which the action was executeda
- the action executedsprime
- the state to which the agent transitioned