public abstract class MADynamicProgramming extends java.lang.Object implements MultiAgentQSourceProvider
SGBackupOperator
object.
Note that the agent definitions can only be changed up until planning begins. Once planning has begun, the agent definitions must remain fixed for consistency of planning results. If the the client tries to change the agent definitions after planning has already begun, then a runtime exception will be thrown.
Since value function planning algorithms compute multi-agent Q-values, this object implements the MultiAgentQSourceProvider
interface.
Modifier and Type | Class and Description |
---|---|
protected class |
MADynamicProgramming.BackupBasedQSource
A
QSourceForSingleAgent implementation which stores a value function for an agent and produces Joint action Q-values
by marginalizing over the transition dynamics the reward and discounted next state value. |
class |
MADynamicProgramming.JointActionTransitions
A class for holding all of the transition dynamic information for a given joint action in a given state.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List<SGAgentType> |
agentDefinitions
The agent types
|
protected SGBackupOperator |
backupOperator
The backup operating defining the solution concept to use.
|
protected double |
discount
The discount factor in [0, 1]
|
protected SGDomain |
domain
The domain in which planning is to be performed
|
protected HashableStateFactory |
hashingFactory
The state hashing factory used to query the value function for individual states
|
protected JointModel |
jointModel
The joint action model to use in planning.
|
protected JointRewardFunction |
jointRewardFunction
The joint reward function
|
protected boolean |
planningStarted
Whether planning has begun or not.
|
protected AgentQSourceMap.HashMapAgentQSourceMap |
qSources
The Hash map backed multi-agent Q-source in which to store Q-values.
|
protected TerminalFunction |
terminalFunction
The state terminal function.
|
protected ValueFunction |
vInit
The Q-value initialization function to use.
|
Constructor and Description |
---|
MADynamicProgramming() |
Modifier and Type | Method and Description |
---|---|
double |
backupAllValueFunctions(State s)
Backups the state value function for all agent's value functions in state s.
|
AgentQSourceMap |
getQSources()
Returns an object that can provide Q-value sources for each agent.
|
boolean |
hasStartedPlanning()
Indicates whether planning has begun or not.
|
void |
initMAVF(SGDomain domain,
java.util.List<SGAgentType> agentDefinitions,
JointRewardFunction jointRewardFunction,
TerminalFunction terminalFunction,
double discount,
HashableStateFactory hashingFactory,
ValueFunction vInit,
SGBackupOperator backupOperator)
Initializes all the main datstructres of the value function valueFunction
|
abstract void |
planFromState(State s)
Calling this method causes planning to be performed from State s.
|
void |
setAgentDefinitions(java.util.List<SGAgentType> agentDefinitions)
Sets/changes the agent definitions to use in planning.
|
protected SGDomain domain
protected java.util.List<SGAgentType> agentDefinitions
protected JointModel jointModel
protected JointRewardFunction jointRewardFunction
protected TerminalFunction terminalFunction
protected double discount
protected HashableStateFactory hashingFactory
protected ValueFunction vInit
protected SGBackupOperator backupOperator
protected AgentQSourceMap.HashMapAgentQSourceMap qSources
protected boolean planningStarted
public void initMAVF(SGDomain domain, java.util.List<SGAgentType> agentDefinitions, JointRewardFunction jointRewardFunction, TerminalFunction terminalFunction, double discount, HashableStateFactory hashingFactory, ValueFunction vInit, SGBackupOperator backupOperator)
domain
- the domain in which to perform planningagentDefinitions
- the definitions of the agents involved in the planning problem.jointRewardFunction
- the joint reward functionterminalFunction
- the terminal state functiondiscount
- the discount factorhashingFactory
- the state hashing factorying to use to lookup Q-values for individual statesvInit
- the value function initialization function to usebackupOperator
- the solution concept backup operator to use.public boolean hasStartedPlanning()
public void setAgentDefinitions(java.util.List<SGAgentType> agentDefinitions)
hasStartedPlanning()
method.agentDefinitions
- the definitions of agents involve in the planning problem.public abstract void planFromState(State s)
s
- the state from which planning is to be performed.public AgentQSourceMap getQSources()
MultiAgentQSourceProvider
getQSources
in interface MultiAgentQSourceProvider
AgentQSourceMap
object.public double backupAllValueFunctions(State s)
s
- the state in which the value functions should be backed up.