bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
cuberl::rl::algos::pg::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 cuberl::rl::algos::pg::A2CConfig::load_from_json ( const std::string &  filename)

Load the configuration from the given json file.

◆ print()

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

print

Parameters
out
Returns

Member Data Documentation

◆ beta

real_t cuberl::rl::algos::pg::A2CConfig::beta {0.0}

Coefficient for accounting for entropy contribution.

◆ buffer_size

uint_t cuberl::rl::algos::pg::A2CConfig::buffer_size {100}

◆ clip_critic_grad

bool cuberl::rl::algos::pg::A2CConfig::clip_critic_grad {false}

Flag indicating whether to clip the critic grad.

◆ clip_policy_grad

bool cuberl::rl::algos::pg::A2CConfig::clip_policy_grad {false}

Flag indicating whether to clip the policy grad.

◆ device_type

DeviceType cuberl::rl::algos::pg::A2CConfig::device_type {DeviceType::CPU}

◆ gamma

real_t cuberl::rl::algos::pg::A2CConfig::gamma {0.99}

Discount factor.

◆ lambda

real_t cuberl::rl::algos::pg::A2CConfig::lambda {0.1}

GAE lambda.

◆ max_grad_norm_critic

real_t cuberl::rl::algos::pg::A2CConfig::max_grad_norm_critic {1.0}

The value to clip the gradient for the actor.

◆ max_grad_norm_policy

real_t cuberl::rl::algos::pg::A2CConfig::max_grad_norm_policy {1.0}

The value to clip the gradient for the policy.

◆ max_itrs_per_episode

uint_t cuberl::rl::algos::pg::A2CConfig::max_itrs_per_episode {100}

Number of iterations per episode.

◆ n_episodes

uint_t cuberl::rl::algos::pg::A2CConfig::n_episodes {100}

Number of training episodes.

◆ normalize_advantages

bool cuberl::rl::algos::pg::A2CConfig::normalize_advantages {true}

◆ policy_loss_weight

real_t cuberl::rl::algos::pg::A2CConfig::policy_loss_weight { 1.0}

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

◆ save_model_path

std::string cuberl::rl::algos::pg::A2CConfig::save_model_path {""}

◆ value_loss_weight

real_t cuberl::rl::algos::pg::A2CConfig::value_loss_weight {1.0}

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