public static class MountainCar.MCModel extends java.lang.Object implements FullStateModel
FullStateModel.Helper
Modifier and Type | Field and Description |
---|---|
protected MountainCar.MCPhysicsParams |
physParams |
Constructor and Description |
---|
MCModel(MountainCar.MCPhysicsParams physParams) |
Modifier and Type | Method and Description |
---|---|
protected int |
dir(java.lang.String actionName) |
State |
move(State s,
int dir)
Changes the agents position in the provided state using car engine acceleration in the specified direction.
|
State |
sample(State s,
Action a)
Samples and returns a
State from a state transition function. |
java.util.List<StateTransitionProb> |
stateTransitions(State s,
Action a)
|
protected MountainCar.MCPhysicsParams physParams
public MCModel(MountainCar.MCPhysicsParams physParams)
public java.util.List<StateTransitionProb> stateTransitions(State s, Action a)
FullStateModel
Action
is applied in State
s. The returned
list only needs to include transitions that have non-zero probability of occurring.stateTransitions
in interface FullStateModel
s
- the source statea
- the action to be applied in the source stateStateTransitionProb
objects.public State sample(State s, Action a)
SampleStateModel
State
from a state transition function.sample
in interface SampleStateModel
s
- the source statea
- the action to be executed in the source stateState
public State move(State s, int dir)
s
- the state in which the agents position should be modifieddir
- the direction of accelerationprotected int dir(java.lang.String actionName)