13#include "bitsim/extern/nlohmann/json/json.hpp"
18#include <unordered_map>
72 static const std::string
name;
77 static const std::string
URI;
121 make(
const std::string &
version,
const std::unordered_map<std::string, std::any> &options,
122 const std::unordered_map<std::string, std::any> &
reset_options)
override final;
131 bool is_sab() const noexcept {
return is_sab_; }
150 bool is_natural_{
false};
153 void make_natural() noexcept { is_natural_ =
true; }
154 void make_sab() noexcept { is_sab_ =
true; }
SpaceType::state_space state_space_type
Type describing the environment state space.
Definition env_base.h:45
SpaceType::state_type state_type
Type describing an individual state.
Definition env_base.h:48
const std::unordered_map< std::string, std::any > & reset_options() const noexcept
Definition env_base.h:105
SpaceType::action_space action_space_type
Type describing the environment action space.
Definition env_base.h:51
TimeStepType time_step_type
Alias for the type returned when stepping the environment.
Definition env_base.h:42
SpaceType::action_type action_type
Type representing an individual action.
Definition env_base.h:54
std::string version() const noexcept
Definition env_base.h:143
virtual time_step_type step(const action_type &action) override final
step
base_type::state_space_type state_space_type
The type describing the state space for the environment.
Definition black_jack_env.h:93
base_type::time_step_type time_step_type
The time step type we return every time a step in the environment is performed.
Definition black_jack_env.h:88
virtual void make(const std::string &version, const std::unordered_map< std::string, std::any > &options, const std::unordered_map< std::string, std::any > &reset_options) override final
make. Builds the environment. Optionally we can choose if the environment will be slippery
~BlackJack() override=default
static const std::string URI
The URI for accessing the environment.
Definition black_jack_env.h:77
bool is_sab() const noexcept
Definition black_jack_env.h:131
BlackJack(const BlackJack &other)
ToyTextEnvBase< TimeStep< std::vector< uint_t > >, 48, 2 >::base_type base_type
The base type.
Definition black_jack_env.h:82
static const std::string name
name
Definition black_jack_env.h:72
base_type::action_type action_type
The type of the action to be undertaken in the environment.
Definition black_jack_env.h:103
virtual dynamics_t build_dynamics_from_response_(const nlohmann::json &) const override final
build the dynamics from response
bool is_natural() const noexcept
Definition black_jack_env.h:130
base_type::action_space_type action_space_type
The type of the action space for the environment.
Definition black_jack_env.h:98
virtual time_step_type create_time_step_from_response_(const nlohmann::json &) const override final
Handle the reset response from the environment server.
base_type::state_type state_type
The type of the action to be undertaken in the environment.
Definition black_jack_env.h:108
BlackJack(network::RESTRLEnvClient &api_server)
std::vector< std::tuple< real_t, uint_t, real_t, bool > > dynamics_t
Definition toy_text_base.h:71
ToyTextEnvBase(network::RESTRLEnvClient &api_server, const std::string &name)
Definition toy_text_base.h:113
Utility class to facilitate HTTP requests between the environments REST API and C++ drivers.
Definition rest_rl_env_client.h:28
Definition lunar_lander_env.h:18
Various utilities used when working with RL problems.
Definition bitrl_log.h:25