Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,Action> |
actionMap |
protected java.util.List<Action> |
actions |
attributeMap, attributes, debugCode, objectClasses, objectClassMap, objectIdentifierDependentDomain, propFunctionMap, propFunctions
Constructor and Description |
---|
SADomain() |
Modifier and Type | Method and Description |
---|---|
void |
addAction(Action act)
Add a single agent action that defines this domain.
|
void |
addActionObserverForAllAction(ActionObserver observer)
Adss the action observer to all actions associated with this domain.
|
void |
addSGAgentAction(SGAgentAction sa)
Add a
SGAgentAction that can be executed by an agent in the game. |
void |
clearAllActionObserversForAllActions()
Clears all action observers for all action in this domain.
|
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.
|
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 |
setActionObserverForAllAction(ActionObserver observer)
Clears all action observers for all actions in this domain and then sets them to have the single action observer provided
|
addAttribute, addObjectClass, addPropositionalFunction, getAttribute, getAttributes, getDebugCode, getNewDomainWithCopiedObjectClasses, getObjectClass, getObjectClasses, getPropFunction, getPropFunctions, getPropositionlFunctionsFromObjectClass, getPropositionlFunctionsMap, isObjectIdentifierDependent, setDebugCode, setObjectIdentiferDependence, toggleDebugPrinting
protected java.util.List<Action> actions
protected java.util.Map<java.lang.String,Action> actionMap
public void setActionObserverForAllAction(ActionObserver observer)
observer
- the single action observer to set all actions to use.public void addActionObserverForAllAction(ActionObserver observer)
observer
- the observer to set all actions to use.public void clearAllActionObserversForAllActions()
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
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.protected Domain newInstance()
Domain
newInstance
in class Domain