62#include "bitrl/extern/nlohmann/json/json.hpp"
68#include <unordered_map>
73namespace envs::gymnasium
101template <u
int_t s
ide_size>
103 :
public ToyTextEnvBase<TimeStep<uint_t>, frozenlake_state_size<side_size>::size, 3>
114 static const std::string
URI;
119 typedef std::vector<std::tuple<real_t, uint_t, real_t, bool>>
dynamics_t;
173 make(
const std::string &
version,
const std::unordered_map<std::string, std::any> &options,
174 const std::unordered_map<std::string, std::any> &
reset_options)
override final;
185 std::string
map_type() const noexcept {
return side_size == 4 ?
"4x4" :
"8x8"; }
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
SpaceType::action_type action_type
Type representing an individual action.
Definition env_base.h:53
std::string version() const noexcept
Get the environment version set during make().
Definition env_base.h:142
Definition frozen_lake_env.h:104
static const std::string URI
The URI for accessing the environment.
Definition frozen_lake_env.h:114
virtual time_step_type step(const action_type &action) override final
Step in the environment following the given action.
Definition frozen_lake_env.cpp:107
static const std::string name
name
Definition frozen_lake_env.h:109
base_type::time_step_type time_step_type
The time step type we return every time a step in the environment is performed.
Definition frozen_lake_env.h:131
~FrozenLake() override=default
~FrozenLake. Destructor.
base_type::state_space_type state_space_type
The type describing the state space for the environment.
Definition frozen_lake_env.h:136
std::vector< std::tuple< real_t, uint_t, real_t, bool > > dynamics_t
dynamics_t
Definition frozen_lake_env.h:119
bool is_slippery() const
is_slipery
Definition frozen_lake_env.cpp:56
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
Definition frozen_lake_env.cpp:70
base_type::action_space_type action_space_type
The type of the action space for the environment.
Definition frozen_lake_env.h:141
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 frozen_lake_env.cpp:40
base_type::action_type action_type
The type of the action to be undertaken in the environment.
Definition frozen_lake_env.h:146
ToyTextEnvBase< TimeStep< uint_t >, frozenlake_state_size< side_size >::size, 3 >::base_type base_type
The base type.
Definition frozen_lake_env.h:125
base_type::state_type state_type
The type of the action to be undertaken in the environment.
Definition frozen_lake_env.h:151
std::string map_type() const noexcept
map_type
Definition frozen_lake_env.h:185
ToyTextEnvBase class. Base class for toy environments from Gymnasium. These environments have a discr...
Definition toy_text_base.h:34
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 frozen_lake_env.h:80