public class SGDomain extends Domain
Domain
class
by including an index for possible actions each individual agent can take and the joint action model that defines the
"physics" of the domain.Modifier and Type | Field and Description |
---|---|
protected java.util.Set<SGAgentAction> |
agentActions
The full set of actions that could be taken by any agent.
|
protected JointActionModel |
jam
The joint action model of the domain
|
protected java.util.Map<java.lang.String,SGAgentAction> |
singleActionMap
A map from action names to their corresponding
SGAgentAction |
attributeMap, attributes, debugCode, objectClasses, objectClassMap, objectIdentifierDependentDomain, propFunctionMap, propFunctions
Constructor and Description |
---|
SGDomain() |
Modifier and Type | Method and Description |
---|---|
void |
addAction(Action act)
Add a single agent action that defines this domain.
|
void |
addSGAgentAction(SGAgentAction sa)
Add a
SGAgentAction that can be executed by an agent in the game. |
Action |
getAction(java.lang.String name)
Returns the single agent action with the given name.
|
java.util.List<Action> |
getActions()
Returns a list of the single agent actions that define this domain.
|
java.util.List<SGAgentAction> |
getAgentActions()
Returns a list of the stochastic game actions that that can be taken by individual agents in this domain.
|
JointActionModel |
getJointActionModel()
Returns the joint action model associated with this domain.
|
SGAgentAction |
getSGAgentAction(java.lang.String name)
Return the stochastic game action (
SGAgentAction ) with the given name. |
SGAgentAction |
getSingleAction(java.lang.String name)
DEPRECATED: Use
Domain.getSGAgentAction(String) instead.Return the stochastic game action with the given name. |
protected Domain |
newInstance()
Will return a new instance of this Domain's class (either SADomain or SGDomain)
|
void |
setJointActionModel(JointActionModel jam)
Sets the joint action model associated with this domain.
|
addAttribute, addObjectClass, addPropositionalFunction, getAttribute, getAttributes, getDebugCode, getNewDomainWithCopiedObjectClasses, getObjectClass, getObjectClasses, getPropFunction, getPropFunctions, getPropositionlFunctionsFromObjectClass, getPropositionlFunctionsMap, isObjectIdentifierDependent, setDebugCode, setObjectIdentiferDependence, toggleDebugPrinting
protected java.util.Set<SGAgentAction> agentActions
protected java.util.Map<java.lang.String,SGAgentAction> singleActionMap
SGAgentAction
protected JointActionModel jam
public void setJointActionModel(JointActionModel jam)
jam
- the joint action model to associate with this domain.public JointActionModel getJointActionModel()
public void addSGAgentAction(SGAgentAction sa)
Domain
SGAgentAction
that can be executed by an agent in the game.
The set of SGAgentAction
s defines the set of joint actions in the stochastic domain (as the cross product).
This method will throw a runtime exception if this domain is not an instance of the stochastic
game domain (SGDomain
). The action will not be added if this domain already has a instance with the same name.addSGAgentAction
in class Domain
sa
- the SGAgentAction
that can be executed by an agent in the game.public java.util.List<SGAgentAction> getAgentActions()
Domain
getAgentActions
in class Domain
public SGAgentAction getSingleAction(java.lang.String name)
Domain
Domain.getSGAgentAction(String)
instead.getSingleAction
in class Domain
name
- the name of the action to returnpublic SGAgentAction getSGAgentAction(java.lang.String name)
Domain
SGAgentAction
) with the given name.
This method will throw a runtime exception
if it is not an instance of the stochastic game domain (SGDomain).getSGAgentAction
in class Domain
name
- the name of the action to returnSGAgentAction
with the given name or null if it does not exist.public void addAction(Action act)
Domain
public java.util.List<Action> getActions()
Domain
getActions
in class Domain
public Action getAction(java.lang.String name)
Domain
protected Domain newInstance()
Domain
newInstance
in class Domain