public class SGTerminalExplorer
extends java.lang.Object
setRewardFunction(burlap.oomdp.stochasticgames.JointReward) and
setTerminalFunction(burlap.oomdp.core.TerminalFunction) methods.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
actionShortHand |
protected JointAction |
curJointAction |
protected SGDomain |
domain |
protected JointActionModel |
jam |
protected JointReward |
rewardFunction |
protected TerminalFunction |
terminalFunction |
| Constructor and Description |
|---|
SGTerminalExplorer(SGDomain domain)
Initializes the explorer with a domain and action model
|
SGTerminalExplorer(SGDomain domain,
JointActionModel jam)
Deprecated.
|
SGTerminalExplorer(SGDomain domain,
JointActionModel jam,
java.util.Map<java.lang.String,java.lang.String> ash)
Deprecated.
|
SGTerminalExplorer(SGDomain domain,
java.util.Map<java.lang.String,java.lang.String> ash)
Initializes the explorer with a domain and action model and shorthand names for actions
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionShortHand(java.lang.String shortHand,
java.lang.String action)
Adds a shorthand for an action
|
void |
exploreFromState(State s)
Causes the explorer to begin from the given input state
|
JointReward |
getRewardFunction() |
TerminalFunction |
getTerminalFunction() |
protected State |
parseCommand(State curState,
java.lang.String command)
Parses a command and returns the resulted modified state
|
void |
printState(State s)
Prints the given state to the terminal.
|
void |
setActionShortHand(java.util.Map<java.lang.String,java.lang.String> ash)
Sets the action shorthands to use
|
void |
setRewardFunction(JointReward rf)
Allows the explorer to keep track of the reward received that will be printed to the output.
|
void |
setTerminalFunction(TerminalFunction terminalFunction) |
protected SGDomain domain
protected java.util.Map<java.lang.String,java.lang.String> actionShortHand
protected JointActionModel jam
protected JointAction curJointAction
protected JointReward rewardFunction
protected TerminalFunction terminalFunction
@Deprecated public SGTerminalExplorer(SGDomain domain, JointActionModel jam)
SGDomain objects are now expected
to have a JointActionModel associated with them, making the constructor parameter for it
unnecessary. Instead use the constructor SGTerminalExplorer(burlap.oomdp.stochasticgames.SGDomain).domain - the domain which will be exploredjam - the action model definition transition dynamicspublic SGTerminalExplorer(SGDomain domain)
domain - the domain which will be explored@Deprecated public SGTerminalExplorer(SGDomain domain, JointActionModel jam, java.util.Map<java.lang.String,java.lang.String> ash)
SGDomain objects are now expected
to have a JointActionModel associated with them, making the constructor parameter for it
unnecessary. Instead use the constructor SGTerminalExplorer(burlap.oomdp.stochasticgames.SGDomain, java.util.Map).domain - the domain which will be exploredjam - the action model definition transition dynamicsash - a map from shorthand names to full action names that can be typed instead of the full action namespublic SGTerminalExplorer(SGDomain domain, java.util.Map<java.lang.String,java.lang.String> ash)
domain - the domain which will be exploredash - a map from shorthand names to full action names that can be typed instead of the full action namespublic void setRewardFunction(JointReward rf)
rf - the reward function to use.public JointReward getRewardFunction()
public TerminalFunction getTerminalFunction()
public void setTerminalFunction(TerminalFunction terminalFunction)
public void setActionShortHand(java.util.Map<java.lang.String,java.lang.String> ash)
ash - a map from action shorthands to full action namespublic void addActionShortHand(java.lang.String shortHand,
java.lang.String action)
shortHand - the shorthand for the actionaction - the full name of the action that the shorthand representspublic void exploreFromState(State s)
s - the state from which to start exploring.protected State parseCommand(State curState, java.lang.String command)
curState - the current state to modifycommand - the special command to parsepublic void printState(State s)
s - the state to print to the terminal.