public static class GridGame.GGJointRewardFunction extends java.lang.Object implements JointRewardFunction
| Constructor and Description |
|---|
GGJointRewardFunction(OODomain ggDomain)
Initializes for a given domain.
|
GGJointRewardFunction(OODomain ggDomain,
double stepCost,
double goalReward,
boolean noopIncursStepCost)
Initializes for a given domain, step cost reward and goal reward.
|
GGJointRewardFunction(OODomain ggDomain,
double stepCost,
double universalGoalReward,
boolean noopIncursStepCost,
java.util.Map<java.lang.Integer,java.lang.Double> personalGoalRewards)
Initializes for a given domain, step cost reward, universal goal reward, and unique personal goal reward for each player.
|
GGJointRewardFunction(OODomain ggDomain,
double stepCost,
double personalGoalReward,
double universalGoalReward,
boolean noopIncursStepCost)
Initializes for a given domain, step cost reward, personal goal reward, and universal goal reward.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
defaultCost(int aid,
JointAction ja)
Returns a default cost for an agent assuming the agent didn't transition to a goal state.
|
protected double |
getPersonalGoalReward(OOState s,
java.lang.String agentName)
Returns the personal goal rewards.
|
double[] |
reward(State s,
JointAction ja,
State sp)
Returns the reward received by each agent specified in the joint action.
|
public GGJointRewardFunction(OODomain ggDomain)
ggDomain - the domainpublic GGJointRewardFunction(OODomain ggDomain, double stepCost, double goalReward, boolean noopIncursStepCost)
ggDomain - the domainstepCost - the reward returned for all transitions except transtions to goal locationsgoalReward - the reward returned for transitioning to a personal or universal goalnoopIncursStepCost - if true, then noop actions also incur the stepCost reward; if false, then noops always return 0 reward.public GGJointRewardFunction(OODomain ggDomain, double stepCost, double personalGoalReward, double universalGoalReward, boolean noopIncursStepCost)
ggDomain - the domainstepCost - the reward returned for all transitions except transtions to goal locationspersonalGoalReward - the reward returned for transitions to a personal goaluniversalGoalReward - the reward returned for transitions to a universal goalnoopIncursStepCost - if true, then noop actions also incur the stepCost reward; if false, then noops always return 0 reward.public GGJointRewardFunction(OODomain ggDomain, double stepCost, double universalGoalReward, boolean noopIncursStepCost, java.util.Map<java.lang.Integer,java.lang.Double> personalGoalRewards)
ggDomain - the domainstepCost - the reward returned for all transitions except transtions to goal locationsuniversalGoalReward - the reward returned for transitions to a universal goalnoopIncursStepCost - if true, then noop actions also incur the stepCost reward; if false, then noops always return 0 reward.personalGoalRewards - a map from player numbers to their personal goal reward (the first player number is 0)public double[] reward(State s, JointAction ja, State sp)
JointRewardFunctionreward in interface JointRewardFunctions - that state in which the joint action was taken.ja - the joint action taken.sp - the resulting state from taking the joint actionprotected double defaultCost(int aid,
JointAction ja)
aid - the agent of interestja - the joint action setprotected double getPersonalGoalReward(OOState s, java.lang.String agentName)
s - the state in which the agent player numbers are definedagentName - the agent name for which the person goal reward is to be returned