Class MountainCar¶
Defined in File mountain_car_env.h
Inheritance Relationships¶
Base Type¶
public bitrl::envs::gymnasium::GymnasiumEnvBase< TimeStep< std::vector< real_t > >, ContinuousVectorStateDiscreteActionEnv< 3, 2, 0, real_t > >(Template Class GymnasiumEnvBase)
Class Documentation¶
-
class MountainCar : public bitrl::envs::gymnasium::GymnasiumEnvBase<TimeStep<std::vector<real_t>>, ContinuousVectorStateDiscreteActionEnv<3, 2, 0, real_t>>¶
The MountainCar class.
Public Types
-
typedef GymnasiumEnvBase<TimeStep<std::vector<real_t>>, ContinuousVectorStateDiscreteActionEnv<3, 2, 0, real_t>>::base_type base_type¶
Base class type.
-
typedef base_type::time_step_type time_step_type¶
The time step type we return every time a step in the environment is performed.
-
typedef base_type::state_space_type state_space_type¶
The type describing the state space for the environment.
-
typedef base_type::action_space_type action_space_type¶
The type of the action space for the environment.
Public Functions
-
MountainCar(const RESTApiServerWrapper &api_server)¶
MountainCar. Constructor. Creates an environment.
- Parameters:
version – The version of the environment
gym_namespace – The boost::python open-ai gym namespace
do_create – If true it calls make
-
MountainCar(const RESTApiServerWrapper &api_server, const uint_t cidx)¶
Constructor. Protected so that applications cannot explicitly instantiate copies.
-
MountainCar(const MountainCar &other)¶
copy ctor
-
~MountainCar() = default¶
~MountainCar. Destructor.
-
virtual void make(const std::string &version, const std::unordered_map<std::string, std::any>&) final override¶
make. Build the environment
-
virtual time_step_type step(const action_type &action) final override¶
step
-
MountainCar make_copy(uint_t cidx) const¶
Create a new copy of the environment with the given copy index.
Public Static Attributes
-
static const std::string name = "MountainCar"¶
name
-
static const std::string URI = "/gymnasium/mountain-car-env"¶
The URI for accessing the environment.
Protected Functions
-
virtual time_step_type create_time_step_from_response_(const nlohmann::json &response) const final override¶
Handle the reset response from the environment server.
-
typedef GymnasiumEnvBase<TimeStep<std::vector<real_t>>, ContinuousVectorStateDiscreteActionEnv<3, 2, 0, real_t>>::base_type base_type¶