bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
reinforce_config.h
Go to the documentation of this file.
1#ifndef REINFORCE_CONFIG_H
2#define REINFORCE_CONFIG_H
3
7
8#include <ostream>
9#include <string>
10
11namespace cuberl {
12namespace rl {
13namespace algos {
14namespace pg {
15
19enum class BaselineEnumType { NONE=-1, CONSTANT=0, MEAN=1, STANDARDIZE=2};
20
21
86
87
88inline
89std::ostream& operator<<(std::ostream& out, ReinforceConfig opts){
90 return opts.print(out);
91}
92
93}
94}
95}
96}
97
98#endif
const real_t TOLERANCE
Tolerance used around the library.
Definition bitrl_consts.h:31
double real_t
real_t
Definition bitrl_types.h:23
std::size_t uint_t
uint_t
Definition bitrl_types.h:43
DeviceType
Enumeration of various device types.
Definition bitrl_types.h:159
std::ostream & operator<<(std::ostream &out, const A2CConfig &opts)
Definition a2c_config.h:115
BaselineEnumType
Enumeration of the baseline types supported.
Definition reinforce_config.h:19
TrainEnumType
Enumeration of train type.
Definition train_enum_type.h:14
Various utilities used when working with RL problems.
Definition cuberl_types.h:16
The ReinforceOpts struct. Holds various configuration options for the Reinforce algorithm.
Definition reinforce_config.h:28
real_t baseline_constant
The constant to use when baseline_type = BaselineEnumType::CONSTANT.
Definition reinforce_config.h:65
real_t gamma
The discount factor.
Definition reinforce_config.h:60
bool normalize_rewards
Definition reinforce_config.h:29
real_t eps
Small constant to use as tolerance Used when baseline_type = BaselineEnumType::STANDARDIZE.
Definition reinforce_config.h:71
uint_t n_episodes
The number of episodes.
Definition reinforce_config.h:49
std::ostream & print(std::ostream &out) const
print
void load_from_json(const std::string &filename)
Load the configuration from the given json file.
uint_t max_itrs_per_episode
Max number of iterations per episode.
Definition reinforce_config.h:55
DeviceType device_type
The device type that PyTorch calculations take place.
Definition reinforce_config.h:44
cuberl::utils::TrainEnumType train_type
How to train the algorithm.
Definition reinforce_config.h:34
BaselineEnumType baseline_type
The baseline to use.
Definition reinforce_config.h:39