public class TerminalExplorer
extends java.lang.Object
setRewardFunction(burlap.oomdp.singleagent.RewardFunction)
and
setTerminalFunctionf(burlap.oomdp.core.TerminalFunction)
methods, which will
cause the terminal to print out the reward for transitions and whether the current state
is a terminal state.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
actionShortHand |
protected Domain |
domain |
protected GroundedAction |
lastAction |
protected RewardFunction |
rewardFunction |
protected TerminalFunction |
terminalFunction |
Constructor and Description |
---|
TerminalExplorer(Domain domain)
Initializes the explorer with the specified domain
|
TerminalExplorer(Domain domain,
java.util.Map<java.lang.String,java.lang.String> ash)
Initializes the explorer with the specified domain and short hand names for actions
|
Modifier and Type | Method and Description |
---|---|
void |
addActionShortHand(java.lang.String shortHand,
java.lang.String action)
Adds a short hand name for an action name
|
void |
exploreFromState(State s)
Starts the explorer to run from state s
|
RewardFunction |
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 state s to the terminal.
|
void |
setActionShortHand(java.util.Map<java.lang.String,java.lang.String> ash)
Sets teh short hand names to use for actions.
|
void |
setRewardFunction(RewardFunction rewardFunction) |
void |
setTerminalFunctionf(TerminalFunction terminalFunction) |
protected Domain domain
protected java.util.Map<java.lang.String,java.lang.String> actionShortHand
protected RewardFunction rewardFunction
protected TerminalFunction terminalFunction
protected GroundedAction lastAction
public TerminalExplorer(Domain domain)
domain
- the domain to explorepublic TerminalExplorer(Domain domain, java.util.Map<java.lang.String,java.lang.String> ash)
domain
- the domain to exploreash
- a map from short hand names to full action names. For instance, "s->stack"public RewardFunction getRewardFunction()
public void setRewardFunction(RewardFunction rewardFunction)
public TerminalFunction getTerminalFunction()
public void setTerminalFunctionf(TerminalFunction terminalFunction)
public void setActionShortHand(java.util.Map<java.lang.String,java.lang.String> ash)
ash
- a map from short hand names to full action names. For instance, "s->stack"public void addActionShortHand(java.lang.String shortHand, java.lang.String action)
shortHand
- the short hand name to useaction
- the full action namepublic void exploreFromState(State s)
s
- the state from which to explore.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.