16#include "bitrl/extern/nlohmann/json/json.hpp"
27template <
typename StateTp>
class VectorTimeStep;
29namespace envs::gymnasium
52 typedef std::vector<typename action_space::space_item_type>
action_type;
73 static const std::string
name;
78 static const std::string
URI;
131 make(
const std::string &
version,
const std::unordered_map<std::string, std::any> &,
132 const std::unordered_map<std::string, std::any> &
reset_options)
override final;
const std::unordered_map< std::string, std::any > & reset_options() const noexcept
Access the configuration options provided to make().
Definition env_base.h:104
TimeStepType time_step_type
Alias for the type returned when stepping the environment.
Definition env_base.h:41
std::string version() const noexcept
Get the environment version set during make().
Definition env_base.h:142
The CartPole class Interface for CartPole environment.
Definition acrobot_vec_env.h:67
GymnasiumVecEnvBase< VectorTimeStep< detail_::AcrobotVEnv::state_type >, detail_::AcrobotVEnv >::base_type base_type
Base class type.
Definition acrobot_vec_env.h:84
base_type::action_space_type action_space_type
The type of the action space for the environment.
Definition acrobot_vec_env.h:100
base_type::state_type state_type
The type of the state.
Definition acrobot_vec_env.h:110
~AcrobotV() override=default
~Acrobot. Destructor
virtual time_step_type create_time_step_from_response_(const nlohmann::json &response) const override final
Handle the reset response from the environment server.
Definition acrobot_vec_env.cpp:15
static const std::string name
name
Definition acrobot_vec_env.h:73
uint_t n_actions() const noexcept
n_actions. Returns the number of actions
Definition acrobot_vec_env.h:142
base_type::state_space_type state_space_type
The type describing the state space for the environment.
Definition acrobot_vec_env.h:95
static const std::string URI
The URI for accessing the environment.
Definition acrobot_vec_env.h:78
base_type::action_type action_type
The type of the action to be undertaken in the environment.
Definition acrobot_vec_env.h:105
virtual time_step_type step(const action_type &action) override final
step. Step in the environment following the given action
Definition acrobot_vec_env.cpp:62
base_type::time_step_type time_step_type
The time step type we return every time a step in the environment is performed.
Definition acrobot_vec_env.h:90
virtual void make(const std::string &version, const std::unordered_map< std::string, std::any > &, const std::unordered_map< std::string, std::any > &reset_options) override final
make. Build the environment
Definition acrobot_vec_env.cpp:41
Definition gymnasium_vector_env_base.h:33
Utility class to facilitate HTTP requests between the environments REST API and C++ drivers.
Definition rest_rl_env_client.h:29
Definition bitrl_consts.h:14
std::size_t uint_t
uint_t
Definition bitrl_types.h:43
Definition space_type.h:135
std::vector< T > space_item_type
item_t
Definition space_type.h:147
static constexpr uint_t size
The overall size of the space meaning how many elements can potentially the space have.
Definition space_type.h:142
A scalar discrete space can be used to denote a space that only has a single value at each time....
Definition space_type.h:22
static constexpr uint_t size
The overall size of the space meaning how many elements can potentially the space have.
Definition space_type.h:38
Definition acrobot_vec_env.h:36
ScalarDiscreteSpace< 0, 3 > action_space
Definition acrobot_vec_env.h:47
static constexpr uint_t ACTION_SPACE_SIZE
state space size
Definition acrobot_vec_env.h:57
std::vector< typename action_space::space_item_type > action_type
the Action type
Definition acrobot_vec_env.h:52
state_space::space_item_type state_type
Definition acrobot_vec_env.h:40
static constexpr uint_t STATE_SPACE_SIZE
state space size
Definition acrobot_vec_env.h:45
ContinuousVectorSpace< 6, real_t > state_space
Definition acrobot_vec_env.h:38