public static class FullStateModel.Helper
extends java.lang.Object
| Constructor and Description |
|---|
Helper() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<StateTransitionProb> |
deterministicTransition(SampleStateModel model,
State s,
Action a)
Method to easily implement the
FullStateModel.stateTransitions(State, Action) method for deterministic domains. |
static State |
sampleByEnumeration(FullStateModel model,
State s,
Action a)
Method to implement the
SampleStateModel.sample(State, Action) method when the
FullStateModel.stateTransitions(State, Action) method is implemented. |
public static java.util.List<StateTransitionProb> deterministicTransition(SampleStateModel model, State s, Action a)
FullStateModel.stateTransitions(State, Action) method for deterministic domains.
Operates by getting a transition from the SampleStateModel.sample(State, Action) method and wraps
it in a StateTransitionProb with probability 1 and then returns a list of that just one element.model - the SampleStateModel with an implemented SampleStateModel.sample(State, Action) method.s - the input statea - the action taken.StateTransitionProbpublic static State sampleByEnumeration(FullStateModel model, State s, Action a)
SampleStateModel.sample(State, Action) method when the
FullStateModel.stateTransitions(State, Action) method is implemented. Operates by calling
the FullStateModel.stateTransitions(State, Action) method, rolls a random number, and selects a
transition according the probability specified by FullStateModel.stateTransitions(State, Action).model - the FullStateModel with the implemented FullStateModel.stateTransitions(State, Action) method.s - the input statea - the action to be applied in the input stateState).