Class CartPole¶
Defined in File cart_pole_env.h
Inheritance Relationships¶
Base Type¶
public bitrl::envs::gymnasium::GymnasiumEnvBase< TimeStep< std::vector< real_t > >, ContinuousVectorStateDiscreteActionEnv< 4, 2, 0, real_t > >(Template Class GymnasiumEnvBase)
Class Documentation¶
-
class CartPole : public bitrl::envs::gymnasium::GymnasiumEnvBase<TimeStep<std::vector<real_t>>, ContinuousVectorStateDiscreteActionEnv<4, 2, 0, real_t>>¶
The CartPole class Interface for CartPole environment.
Public Types
-
typedef GymnasiumEnvBase<TimeStep<std::vector<real_t>>, ContinuousVectorStateDiscreteActionEnv<4, 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
-
CartPole(const RESTApiServerWrapper &api_server)¶
CartPole. Constructor.
-
CartPole(const RESTApiServerWrapper &api_server, const uint_t cidx)¶
CartPole. Constructor.
-
~CartPole() = default¶
~CartPole. 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 = "CartPole"¶
name
-
static const std::string URI = "/gymnasium/cart-pole-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<4, 2, 0, real_t>>::base_type base_type¶