1#ifndef REINFORCE_CONFIG_H
2#define REINFORCE_CONFIG_H
87 std::ostream &
print(std::ostream &out)
const;
std::ostream & operator<<(std::ostream &out, const A2CConfig &opts)
Definition a2c_config.h:117
BaselineEnumType
Enumeration of the baseline types supported.
Definition reinforce_config.h:24
@ STANDARDIZE
Definition reinforce_config.h:28
@ MEAN
Definition reinforce_config.h:27
@ CONSTANT
Definition reinforce_config.h:26
@ NONE
Definition reinforce_config.h:25
Definition dp_algo_base.h:15
Definition dummy_agent.h:9
TrainEnumType
Enumeration of train type.
Definition train_enum_type.h:17
@ BATCH
Definition train_enum_type.h:19
Various utilities used when working with RL problems.
Definition bitrl_log.h:25
const real_t TOLERANCE
Tolerance used around the library.
Definition bitsim_consts.h:26
std::size_t uint_t
uint_t
Definition bitsim_types.h:40
double real_t
real_t
Definition bitsim_types.h:20
DeviceType
Enumeration of various device types.
Definition bitsim_types.h:186
The ReinforceOpts struct. Holds various configuration options for the Reinforce algorithm.
Definition reinforce_config.h:37
std::ostream & print(std::ostream &out) const
print
real_t gamma
The discount factor.
Definition reinforce_config.h:69
BaselineEnumType baseline_type
The baseline to use.
Definition reinforce_config.h:48
bool normalize_rewards
Definition reinforce_config.h:38
real_t baseline_constant
The constant to use when baseline_type = BaselineEnumType::CONSTANT.
Definition reinforce_config.h:74
void load_from_json(const std::string &filename)
Load the configuration from the given json file.
DeviceType device_type
The device type that PyTorch calculations take place.
Definition reinforce_config.h:53
bitrl::utils::TrainEnumType train_type
How to train the algorithm.
Definition reinforce_config.h:43
uint_t n_episodes
The number of episodes.
Definition reinforce_config.h:58
real_t eps
Small constant to use as tolerance Used when baseline_type = BaselineEnumType::STANDARDIZE.
Definition reinforce_config.h:80
uint_t max_itrs_per_episode
Max number of iterations per episode.
Definition reinforce_config.h:64