bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
env_types.h
Go to the documentation of this file.
1#ifndef BITRL_ENV_TYPES_H
2#define BITRL_ENV_TYPES_H
3#include "bitrl/bitrl_types.h"
5
6namespace bitrl
7{
8namespace envs
9{
10
11template <uint_t state_end, uint_t action_end, uint_t state_start = 0, uint_t action_start = 0>
13{
14
19
24
29
34
39
44
50
56 static action_type sample_action(uint_t seed) { return action_space::sample(seed, true); }
57
58 static std::vector<action_type> sample_action(uint_t seed, uint_t size)
59 {
60 return action_space::sample(seed, size, true);
61 }
62};
63
64template <uint_t StateSpaceSize, uint_t action_end, uint_t action_start = 0,
65 typename StateSpaceItemType = real_t>
102
103template <uint_t StateSpaceSize, uint_t ActionSpaceSize, typename StateSpaceItemType = real_t,
104 typename ActionSpaceItemType = real_t>
137
138template <uint_t StateSpaceSize, uint_t action_end, typename real_range, uint_t action_start = 0,
139 typename StateSpaceItemType = real_t>
177
178template <uint_t StateSpaceSize, uint_t AS, uint_t AE, typename StateSpaceItemType = uint_t>
211
212} // namespace envs
213} // namespace bitrl
214
215#endif
Definition bitrl_consts.h:14
double real_t
real_t
Definition bitrl_types.h:23
std::size_t uint_t
uint_t
Definition bitrl_types.h:43
Definition space_type.h:135
std::vector< T > space_item_type
item_t
Definition space_type.h:147
static constexpr uint_t size
The overall size of the space meaning how many elements can potentially the space have.
Definition space_type.h:142
state_space::space_item_type state_type
the State type
Definition env_types.h:150
static constexpr real_range action_limits
the action limits
Definition env_types.h:160
real_range::value_type action_type
the Action type is real valued
Definition env_types.h:170
ScalarDiscreteSpace< action_start, action_end > action_space
item_t
Definition env_types.h:165
static constexpr uint_t STATE_SPACE_SIZE
state space size
Definition env_types.h:155
ContinuousVectorSpace< StateSpaceSize, StateSpaceItemType > state_space
The type of the state space.
Definition env_types.h:145
static constexpr uint_t ACTION_SPACE_SIZE
action space size
Definition env_types.h:175
static constexpr uint_t ACTION_SPACE_SIZE
action space size
Definition env_types.h:130
action_space::space_item_type action_type
The type of action.
Definition env_types.h:135
static constexpr uint_t STATE_SPACE_SIZE
state space size
Definition env_types.h:115
ContinuousVectorSpace< ActionSpaceSize, ActionSpaceItemType > action_space
The type of the action space.
Definition env_types.h:125
ContinuousVectorSpace< StateSpaceSize, StateSpaceItemType > state_space
The type of the state space.
Definition env_types.h:110
state_space::space_item_type state_type
The type of state.
Definition env_types.h:120
action_space::space_item_type action_type
the Action type
Definition env_types.h:89
static constexpr uint_t STATE_SPACE_SIZE
state space size
Definition env_types.h:79
static action_type sample_action()
sample
Definition env_types.h:100
state_space::space_item_type state_type
the State type
Definition env_types.h:74
ScalarDiscreteSpace< action_start, action_end > action_space
item_t
Definition env_types.h:84
ContinuousVectorSpace< StateSpaceSize, StateSpaceItemType > state_space
Definition env_types.h:69
static constexpr uint_t ACTION_SPACE_SIZE
action space size
Definition env_types.h:94
Definition space_type.h:151
std::vector< T > space_item_type
item_t
Definition space_type.h:157
ScalarDiscreteSpace< AS, AE > action_space
the action space type
Definition env_types.h:199
DiscreteVectorSpace< StateSpaceSize, StateSpaceItemType > state_space
the state space type
Definition env_types.h:184
static constexpr uint_t ACTION_SPACE_SIZE
state space size
Definition env_types.h:209
static constexpr uint_t STATE_SPACE_SIZE
state space size
Definition env_types.h:194
action_space::space_item_type action_type
the Action type
Definition env_types.h:204
state_space::space_item_type state_type
the State type
Definition env_types.h:189
Definition env_types.h:13
ScalarDiscreteSpace< state_start, state_end > state_space
item_t
Definition env_types.h:18
action_space::space_item_type action_type
the Action type
Definition env_types.h:38
ScalarDiscreteSpace< action_start, action_end > action_space
the action space type
Definition env_types.h:33
static constexpr uint_t STATE_SPACE_SIZE
state space size
Definition env_types.h:28
static action_type sample_action()
sample
Definition env_types.h:49
static std::vector< action_type > sample_action(uint_t seed, uint_t size)
Definition env_types.h:58
static constexpr uint_t ACTION_SPACE_SIZE
action space size
Definition env_types.h:43
state_space::space_item_type state_type
the State type
Definition env_types.h:23
static action_type sample_action(uint_t seed)
sample
Definition env_types.h:56
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
uint_t space_item_type
item_t
Definition space_type.h:27
static space_item_type sample(bool use_end)
sample
Definition space_type.h:62
static constexpr uint_t size
The overall size of the space meaning how many elements can potentially the space have.
Definition space_type.h:38