public static class GridGame.GGJointRewardFunction extends java.lang.Object implements JointReward
| Constructor and Description |
|---|
GridGame.GGJointRewardFunction(Domain ggDomain)
Initializes for a given domain.
|
GridGame.GGJointRewardFunction(Domain ggDomain,
double stepCost,
double goalReward,
boolean noopIncursStepCost)
Initializes for a given domain, step cost reward and goal reward.
|
GridGame.GGJointRewardFunction(Domain 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.
|
GridGame.GGJointRewardFunction(Domain 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(java.lang.String aname,
JointAction ja)
Returns a default cost for an agent assuming the agent didn't transition to a goal state.
|
protected double |
getPersonalGoalReward(State s,
java.lang.String agentName)
Returns the personal goal rewards.
|
java.util.Map<java.lang.String,java.lang.Double> |
reward(State s,
JointAction ja,
State sp)
Returns the reward received by each agent specified in the joint action.
|
public GridGame.GGJointRewardFunction(Domain ggDomain)
ggDomain - the domainpublic GridGame.GGJointRewardFunction(Domain 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 GridGame.GGJointRewardFunction(Domain 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 GridGame.GGJointRewardFunction(Domain 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 java.util.Map<java.lang.String,java.lang.Double> reward(State s, JointAction ja, State sp)
JointRewardreward in interface JointRewards - 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(java.lang.String aname,
JointAction ja)
aname - the name of the agent for which the default reward should be returned.ja - the joint action setprotected double getPersonalGoalReward(State 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