64template <u
int_t s, u
int_t e>
76 std::random_device rd;
77 std::mt19937 gen(rd());
81template <u
int_t s, u
int_t e>
94 std::mt19937 gen(seed);
98template <u
int_t s, u
int_t e>
99std::vector<typename ScalarDiscreteSpace<s, e>::space_item_type>
110 std::vector<typename ScalarDiscreteSpace<s, e>::space_item_type> vals_;
114 std::mt19937 gen(seed);
117 vals_.push_back(dist(gen));
139 static_assert(std::is_floating_point_v<T> ==
true &&
"Floating point type is expected");
155 static_assert(std::is_integral_v<T> ==
true &&
"Integral type is expected");
Definition cart_pole.h:18
Various utilities used when working with RL problems.
Definition bitrl_log.h:25
std::size_t uint_t
uint_t
Definition bitsim_types.h:40
double real_t
real_t
Definition bitsim_types.h:20
Definition space_type.h:124
static constexpr uint_t size
The overall size of the space meaning how many elements can potentially the space have.
Definition space_type.h:134
real_t space_item_type
item_t
Definition space_type.h:128
Definition space_type.h:138
std::vector< StateSpaceItemType > space_item_type
Definition space_type.h:150
static constexpr uint_t size
Definition space_type.h:145
Definition space_type.h:154
std::vector< StateSpaceItemType > space_item_type
Definition space_type.h:160
static constexpr uint_t size
Definition space_type.h:165
A scalar discrete space can be used to denote a space that only has a single value at each time....
Definition space_type.h:22
static constexpr IntegralRange< s, e > limits
Definition space_type.h:32
static std::vector< space_item_type > sample(uint_t seed, uint_t size, bool use_end)
sample
Definition space_type.h:100
uint_t space_item_type
Definition space_type.h:27
static space_item_type sample(uint_t seed, bool use_end)
sample
Definition space_type.h:82
static space_item_type sample(bool use_end)
sample
Definition space_type.h:65
static constexpr uint_t size
Definition space_type.h:38
A range of integer values in [s, e].
Definition bitsim_types.h:155
static constexpr uint_t E
Definition bitsim_types.h:158
static constexpr uint_t S
Definition bitsim_types.h:157