public class CPClassicModel extends java.lang.Object implements FullStateModel
FullStateModel.Helper| Modifier and Type | Field and Description |
|---|---|
protected CartPoleDomain.CPPhysicsParams |
physParams |
| Constructor and Description |
|---|
CPClassicModel(CartPoleDomain.CPPhysicsParams physParams) |
| Modifier and Type | Method and Description |
|---|---|
State |
moveClassicModel(State s,
double dir)
Simulates the physics for one time step give the input state s, and the direction of force applied.
|
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 CartPoleDomain.CPPhysicsParams physParams
public CPClassicModel(CartPoleDomain.CPPhysicsParams physParams)
public java.util.List<StateTransitionProb> stateTransitions(State s, Action a)
FullStateModelAction is applied in State s. The returned
list only needs to include transitions that have non-zero probability of occurring.stateTransitions in interface FullStateModels - the source statea - the action to be applied in the source stateStateTransitionProb objects.public State sample(State s, Action a)
SampleStateModelState from a state transition function.sample in interface SampleStateModels - the source statea - the action to be executed in the source stateStatepublic State moveClassicModel(State s, double dir)
s - the current state from which one time step of physics will be simulated.dir - the direction of force applied; should be -1, or 1 and is multiplied to this objects movementForceMag parameter. 0 would cause no force.