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