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

The A2CConfig struct. Configuration for A2CSolver class. More...

#include <a2c_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

real_t gamma {0.99}
 Discount factor.
real_t lambda {0.1}
 GAE lambda.
real_t beta {0.0}
 Coefficient for accounting for entropy contribution.
real_t policy_loss_weight {1.0}
 policy_loss_weight. How much weight to give on the policy loss when forming the global loss
real_t value_loss_weight {1.0}
bool clip_policy_grad {false}
 Flag indicating whether to clip the policy grad.
bool clip_critic_grad {false}
 Flag indicating whether to clip the critic grad.
real_t max_grad_norm_policy {1.0}
 The value to clip the gradient for the policy.
real_t max_grad_norm_critic {1.0}
 The value to clip the gradient for the actor.
uint_t n_episodes {100}
 Number of training episodes.
uint_t max_itrs_per_episode {100}
 Number of iterations per episode.
uint_t buffer_size {100}
bool normalize_advantages {true}
DeviceType device_type {DeviceType::CPU}
std::string save_model_path {""}

Detailed Description

The A2CConfig struct. Configuration for A2CSolver class.

Member Function Documentation

◆ load_from_json()

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

Load the configuration from the given json file.

◆ print()

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

print

Parameters
out
Returns

Member Data Documentation

◆ beta

Coefficient for accounting for entropy contribution.

◆ buffer_size

◆ clip_critic_grad

Flag indicating whether to clip the critic grad.

◆ clip_policy_grad

Flag indicating whether to clip the policy grad.

◆ device_type

◆ gamma

◆ lambda

◆ max_grad_norm_critic

The value to clip the gradient for the actor.

◆ max_grad_norm_policy

The value to clip the gradient for the policy.

◆ max_itrs_per_episode

Number of iterations per episode.

◆ n_episodes

Number of training episodes.

◆ normalize_advantages

◆ policy_loss_weight

policy_loss_weight. How much weight to give on the policy loss when forming the global loss

◆ save_model_path

◆ value_loss_weight


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