bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
rl_example_13::ReinforceConfig Struct Reference

The ReinforceOpts struct. Holds various configuration options for the Reinforce algorithm. More...

#include <reinforce_config.h>

Public Member Functions

std::ostream & print (std::ostream &out) const
 print
void load_from_json (const std::string &filename)
 Load the configuration from the given json file.

Public Attributes

bool normalize_rewards {false}
bitrl::utils::TrainEnumType train_type {bitrl::utils::TrainEnumType::BATCH}
 How to train the algorithm.
BaselineEnumType baseline_type {BaselineEnumType::NONE}
 The baseline to use.
DeviceType device_type
 The device type that PyTorch calculations take place.
uint_t n_episodes
 The number of episodes.
uint_t max_itrs_per_episode
 Max number of iterations per episode.
real_t gamma
 The discount factor.
real_t baseline_constant {0.0}
 The constant to use when baseline_type = BaselineEnumType::CONSTANT.
real_t eps {bitsim::consts::TOLERANCE}
 Small constant to use as tolerance Used when baseline_type = BaselineEnumType::STANDARDIZE.

Detailed Description

The ReinforceOpts struct. Holds various configuration options for the Reinforce algorithm.

for REINFORCE algorithm

Member Function Documentation

◆ load_from_json()

void bitrl::rl::algos::pg::ReinforceConfig::load_from_json ( const std::string & filename)

Load the configuration from the given json file.

◆ print()

std::ostream & bitrl::rl::algos::pg::ReinforceConfig::print ( std::ostream & out) const

print

Parameters
out
Returns

Member Data Documentation

◆ baseline_constant

◆ baseline_type

◆ device_type

The device type that PyTorch calculations take place.

◆ eps

Small constant to use as tolerance Used when baseline_type = BaselineEnumType::STANDARDIZE.

◆ gamma

◆ max_itrs_per_episode

◆ n_episodes

◆ normalize_rewards

◆ train_type


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