Class Pendulum¶
Defined in File pendulum_env.h
Inheritance Relationships¶
Base Type¶
public bitrl::envs::gymnasium::GymnasiumEnvBase< TimeStep< std::vector< real_t > >, ContinuousVectorStateContinuousScalarBoundedActionEnv< 3, 1, RealRange<-2.0, 2.0 >, 0, real_t > >(Template Class GymnasiumEnvBase)
Class Documentation¶
-
class Pendulum : public bitrl::envs::gymnasium::GymnasiumEnvBase<TimeStep<std::vector<real_t>>, ContinuousVectorStateContinuousScalarBoundedActionEnv<3, 1, RealRange<-2.0, 2.0>, 0, real_t>>¶
The Pendulum class. Interface for Pendulum environment.
Public Types
-
typedef GymnasiumEnvBase<TimeStep<std::vector<real_t>>, ContinuousVectorStateContinuousScalarBoundedActionEnv<3, 1, RealRange<-2.0, 2.0>, 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
-
Pendulum(const RESTApiServerWrapper &api_server)¶
Pendulum. Constructor.
-
Pendulum(const RESTApiServerWrapper &api_server, const uint_t cidx)¶
Constructor.
-
~Pendulum() = default¶
~Pendulum. 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. Step in the environment following the given action
Public Static Attributes
-
static const std::string name = "Pendulum"¶
name
-
static const std::string URI = "/gymnasium/pendulum-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>>, ContinuousVectorStateContinuousScalarBoundedActionEnv<3, 1, RealRange<-2.0, 2.0>, 0, real_t>>::base_type base_type¶