public static class MacroCellGridWorld.LinearInPFRewardFunction extends java.lang.Object implements RewardFunction
Modifier and Type | Field and Description |
---|---|
protected PropositionalFunction[] |
propositionalFunctions |
protected java.util.Map<java.lang.String,java.lang.Double> |
rewards |
Constructor and Description |
---|
MacroCellGridWorld.LinearInPFRewardFunction(PropositionalFunction[] functions,
java.util.Map<java.lang.String,java.lang.Double> rewards)
Initializes
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Double> |
getPFRewardWeights() |
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 java.util.Map<java.lang.String,java.lang.Double> rewards
protected PropositionalFunction[] propositionalFunctions
public MacroCellGridWorld.LinearInPFRewardFunction(PropositionalFunction[] functions, java.util.Map<java.lang.String,java.lang.Double> rewards)
functions
- the propositional function over which the RF is a functionrewards
- the map from propositional function names to their linear reward weightpublic double reward(State s, GroundedAction 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 transitionedpublic java.util.Map<java.lang.String,java.lang.Double> getPFRewardWeights()