Template Class GymWalk

Inheritance Relationships

Base Type

  • public bitrl::envs::EnvBase< TimeStep< uint_t >, ScalarDiscreteEnv< state_size, 2, 0, 0 > > (Template Class EnvBase)

Class Documentation

template<uint_t state_size>
class GymWalk : public bitrl::envs::EnvBase<TimeStep<uint_t>, ScalarDiscreteEnv<state_size, 2, 0, 0>>

class GymWalk. Interface for the GymWalk environment

Public Types

typedef EnvBase<TimeStep<uint_t>, ScalarDiscreteEnv<state_size, 2, 0, 0>> 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

GymWalk(const RESTApiServerWrapper &api_server)

Constructor.

GymWalk(const RESTApiServerWrapper &api_server, const uint_t cidx)

Constructor.

GymWalk(const GymWalk &other)

copy ctor

virtual void make(const std::string &version, const std::unordered_map<std::string, std::any> &options) final override

make. Builds the environment. Optionally we can choose if the environment will be slippery

virtual bool is_alive() const final override
virtual void close() final override

close the environment

virtual time_step_type step(const action_type &action) final override

step

Parameters:

action

Returns:

virtual time_step_type reset(uint_t seed, const std::unordered_map<std::string, std::any> &options) final override

Reset the environment.

virtual std::unique_ptr<base_type> make_copy(uint_t cidx) const final override

Create a new copy of the environment with the given copy index.

inline uint_t n_states() const noexcept

n_states. Returns the number of states

inline uint_t n_actions() const noexcept

n_actions. Returns the number of actions

Public Static Attributes

static const std::string name = "GymWalk"

name

static const std::string URI = "/gdrl/gym-walk-env"

The URI for accessing the environment.