Implementation of Continuous Mountain Car task. More...
Classes | |
| struct | Action |
| Implementation of action of Continuous Mountain Car. More... | |
| class | State |
| Implementation of state of Continuous Mountain Car. More... | |
Public Member Functions | |
| ContinuousMountainCar (const double positionMin=-1.2, const double positionMax=0.5, const double velocityMin=-0.07, const double velocityMax=0.07) | |
| Construct a Continuous Mountain Car instance using the given constant. More... | |
| State | InitialSample () const |
| Initial position is randomly generated within [-0.6, -0.4]. More... | |
| bool | IsTerminal (const State &state) const |
| Whether given state is a terminal state. More... | |
| double | Sample (const State &state, const Action &action, State &nextState) const |
| Dynamics of Continuous Mountain Car. More... | |
| double | Sample (const State &state, const Action &action) const |
| Dynamics of Continuous Mountain Car. More... | |
Implementation of Continuous Mountain Car task.
Definition at line 27 of file continuous_mountain_car.hpp.
|
inline |
Construct a Continuous Mountain Car instance using the given constant.
| positionMin | Minimum legal position. |
| positionMax | Maximum legal position. |
| velocityMin | Minimum legal velocity. |
| velocityMax | Maximum legal velocity. |
Definition at line 98 of file continuous_mountain_car.hpp.
|
inline |
Initial position is randomly generated within [-0.6, -0.4].
Initial velocity is 0.
Definition at line 163 of file continuous_mountain_car.hpp.
References ContinuousMountainCar::State::Position(), mlpack::math::Random(), and ContinuousMountainCar::State::Velocity().
|
inline |
Whether given state is a terminal state.
| state | desired state. |
Definition at line 177 of file continuous_mountain_car.hpp.
References ContinuousMountainCar::State::Position().
Referenced by ContinuousMountainCar::Sample().
Dynamics of Continuous Mountain Car.
Get reward and next state based on current state and current action.
| state | The current state. |
| action | The current action. |
| nextState | The next state. |
Definition at line 117 of file continuous_mountain_car.hpp.
References ContinuousMountainCar::Action::action, ContinuousMountainCar::IsTerminal(), ContinuousMountainCar::State::Position(), and ContinuousMountainCar::State::Velocity().
Referenced by ContinuousMountainCar::Sample().
Dynamics of Continuous Mountain Car.
Get reward based on current state and current action.
| state | The current state. |
| action | The current action. |
Definition at line 151 of file continuous_mountain_car.hpp.
References ContinuousMountainCar::Sample().