Template Class ToyTextEnvBase

Inheritance Relationships

Base Type

Class Documentation

template<typename TimeStepType, uint_t state_end, uint_t action_end>
class ToyTextEnvBase : public bitrl::envs::gymnasium::GymnasiumEnvBase<TimeStepType, ScalarDiscreteEnv<state_end, action_end, 0, 0>>

ToyTextEnvBase class. Base class for toy environments from Gymnasium. These environments have a discrete action and state spaces.

Public Types

typedef GymnasiumEnvBase<TimeStepType, ScalarDiscreteEnv<state_end, action_end, 0, 0>>::base_type base_type

The base_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.

typedef base_type::action_type action_type

The type of the action to be undertaken in the environment.

typedef base_type::state_type state_type

The type of the state.

typedef std::vector<std::tuple<real_t, uint_t, real_t, bool>> dynamics_t

dynamics_t

Public Functions

virtual ~ToyTextEnvBase() = default

~FrozenLake. Destructor.

dynamics_t p(uint_t sidx, uint_t aidx) const

P.

Parameters:
  • sidx

  • aidx

inline uint_t n_actions() const noexcept

n_actions. Returns the number of actions

inline uint_t n_states() const noexcept

Number of states.

Protected Functions

ToyTextEnvBase(const RESTApiServerWrapper &api_server, const uint_t cidx, const std::string &name)

Constructor.

ToyTextEnvBase(const ToyTextEnvBase &other)

Copy constructor.

virtual dynamics_t build_dynamics_from_response_(const nlohmann::json &response) const

build the dynamics from response