Implementation of state of Mountain Car. More...

Public Member Functions

 State ()
 Construct a state instance. More...

 
 State (const arma::colvec &data)
 Construct a state based on the given data. More...

 
arma::colvec & Data ()
 Modify the internal representation of the state. More...

 
const arma::colvec & Encode () const
 Encode the state to a column vector. More...

 
double Position () const
 Get the position. More...

 
double & Position ()
 Modify the position. More...

 
double Velocity () const
 Get the velocity. More...

 
double & Velocity ()
 Modify the velocity. More...

 

Static Public Attributes

static constexpr size_t dimension = 2
 Dimension of the encoded state. More...

 

Detailed Description

Implementation of state of Mountain Car.

Each state is a (velocity, position) vector.

Definition at line 34 of file mountain_car.hpp.

Constructor & Destructor Documentation

◆ State() [1/2]

State ( )
inline

Construct a state instance.

Definition at line 40 of file mountain_car.hpp.

◆ State() [2/2]

State ( const arma::colvec &  data)
inline

Construct a state based on the given data.

Parameters
dataData for the velocity and position.

Definition at line 48 of file mountain_car.hpp.

Member Function Documentation

◆ Data()

arma::colvec& Data ( )
inline

Modify the internal representation of the state.

Definition at line 52 of file mountain_car.hpp.

◆ Encode()

const arma::colvec& Encode ( ) const
inline

Encode the state to a column vector.

Definition at line 65 of file mountain_car.hpp.

◆ Position() [1/2]

double Position ( ) const
inline

Get the position.

Definition at line 60 of file mountain_car.hpp.

Referenced by MountainCar::InitialSample(), MountainCar::IsTerminal(), and MountainCar::Sample().

◆ Position() [2/2]

double& Position ( )
inline

Modify the position.

Definition at line 62 of file mountain_car.hpp.

◆ Velocity() [1/2]

double Velocity ( ) const
inline

Get the velocity.

Definition at line 55 of file mountain_car.hpp.

Referenced by MountainCar::InitialSample(), and MountainCar::Sample().

◆ Velocity() [2/2]

double& Velocity ( )
inline

Modify the velocity.

Definition at line 57 of file mountain_car.hpp.

Member Data Documentation

◆ dimension

constexpr size_t dimension = 2
static

Dimension of the encoded state.

Definition at line 68 of file mountain_car.hpp.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.2.1/src/mlpack/methods/reinforcement_learning/environment/mountain_car.hpp