bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
bitrl::envs::ScalarDiscreteSpace< s, e > Struct Template Reference

A scalar discrete space can be used to denote a space that only has a single value at each time. For example consider the FrozenLake environment then both the state and the action spaces are ScalarDiscreteSpace. More...

#include <space_type.h>

Public Types

typedef uint_t space_item_type
 item_t
 

Static Public Member Functions

static space_item_type sample (bool use_end)
 sample
 
static space_item_type sample (uint_t seed, bool use_end)
 sample
 
static std::vector< space_item_typesample (uint_t seed, uint_t size, bool use_end)
 sample
 

Static Public Attributes

static constexpr IntegralRange< s, e > limits = IntegralRange<s, e>()
 The limits of the space.
 
static constexpr uint_t size = e - s
 The overall size of the space meaning how many elements can potentially the space have.
 

Detailed Description

template<uint_t s, uint_t e>
struct bitrl::envs::ScalarDiscreteSpace< s, e >

A scalar discrete space can be used to denote a space that only has a single value at each time. For example consider the FrozenLake environment then both the state and the action spaces are ScalarDiscreteSpace.

Member Typedef Documentation

◆ space_item_type

template<uint_t s, uint_t e>
typedef uint_t bitrl::envs::ScalarDiscreteSpace< s, e >::space_item_type

item_t

Member Function Documentation

◆ sample() [1/3]

template<uint_t s, uint_t e>
ScalarDiscreteSpace< s, e >::space_item_type bitrl::envs::ScalarDiscreteSpace< s, e >::sample ( bool  use_end)
static

sample

Returns

◆ sample() [2/3]

template<uint_t s, uint_t e>
ScalarDiscreteSpace< s, e >::space_item_type bitrl::envs::ScalarDiscreteSpace< s, e >::sample ( uint_t  seed,
bool  use_end 
)
static

sample

Parameters
seed
Returns

◆ sample() [3/3]

template<uint_t s, uint_t e>
std::vector< typename ScalarDiscreteSpace< s, e >::space_item_type > bitrl::envs::ScalarDiscreteSpace< s, e >::sample ( uint_t  seed,
uint_t  size,
bool  use_end 
)
static

sample

Parameters
seed
Returns

Member Data Documentation

◆ limits

template<uint_t s, uint_t e>
constexpr IntegralRange<s, e> bitrl::envs::ScalarDiscreteSpace< s, e >::limits = IntegralRange<s, e>()
staticconstexpr

The limits of the space.

◆ size

template<uint_t s, uint_t e>
constexpr uint_t bitrl::envs::ScalarDiscreteSpace< s, e >::size = e - s
staticconstexpr

The overall size of the space meaning how many elements can potentially the space have.


The documentation for this struct was generated from the following file: