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

Classes

class  ActorNetImpl
class  CriticNetImpl
 The Critic network. More...
class  TorchCategorical
class  RESTRLEnvClient
 Utility class to facilitate HTTP requests between the environments REST API and C++ drivers. More...
class  RLSerialAgentTrainer
struct  RLSerialTrainerConfig
 The RLSerialTrainerConfig struct. Configuration struct for the serial RL agent trainer. More...
struct  A2CConfig
 The A2CConfig struct. Configuration for A2CSolver class. More...
class  A2CSolver
 A2C solver assuming separate networks for the actor and the critic. Similar to the Reinforce algorithm implementation, the PolicyType should expose an act method with the following signature. More...
class  TorchNormalDist
 Normal distribution to be used with torchlib. More...
struct  PPOConfig
 The PPOConfig struct. Configuration for PPOSolver class. More...
class  PPOSolver
struct  TorchAdaptor
 The TorchStateAdaptor struct. More...

Typedefs

typedef bitrl::envs::gymnasium::CartPole env_type
using real_t
 real_t
typedef torch::Tensor torch_tensor_t
 torch_tensor_t
using uint_t
 uint_t
using real_t
 real_t
typedef torch::Tensor torch_tensor_t
 torch_tensor_t
using uint_t
 uint_t
using real_t
 real_t
typedef torch::Tensor torch_tensor_t
 torch_tensor_t
using uint_t
 uint_t

Enumerations

enum class  DeviceType
 Enumeration of various device types. More...
enum class  DeviceType
 Enumeration of various device types. More...

Functions

 TORCH_MODULE (ActorNet)
 TORCH_MODULE (CriticNet)

Variables

const std::string SERVER_URL = "http://0.0.0.0:8001/api"
const std::string EXPERIMENT_ID = "1"
const std::string POLICY = "policy.csv"
const uint_t L1 = 4
 Layer sizes for Actor.
const uint_t L2 = 128
const uint_t L3 = 2
const real_t LEARNING_RATE = 0.01
const auto N_EPISODES = 1000

Typedef Documentation

◆ env_type

typedef rlenvscpp::envs::gymnasium::CartPole rl_example_11::env_type

◆ real_t [1/3]

◆ real_t [2/3]

◆ real_t [3/3]

◆ torch_tensor_t [1/3]

typedef torch::Tensor bitrl::torch_tensor_t

◆ torch_tensor_t [2/3]

typedef torch::Tensor bitrl::torch_tensor_t

◆ torch_tensor_t [3/3]

typedef torch::Tensor bitrl::torch_tensor_t

◆ uint_t [1/3]

◆ uint_t [2/3]

◆ uint_t [3/3]

Enumeration Type Documentation

◆ DeviceType [1/2]

enum class bitsim::DeviceType
strong

Enumeration of various device types.

◆ DeviceType [2/2]

enum class bitsim::DeviceType
strong

Enumeration of various device types.

Function Documentation

◆ TORCH_MODULE() [1/2]

rl_example_11::TORCH_MODULE ( ActorNet )

◆ TORCH_MODULE() [2/2]

rl_example_11::TORCH_MODULE ( CriticNet )

Variable Documentation

◆ EXPERIMENT_ID

const std::string rl_example_11::EXPERIMENT_ID = "1"

◆ L1

const uint_t rl_example_11::L1 = 4

Layer sizes for Actor.

◆ L2

const uint_t rl_example_11::L2 = 128

◆ L3

const uint_t rl_example_11::L3 = 2

◆ LEARNING_RATE

real_t rl_example_11::LEARNING_RATE = 0.01
constexpr

◆ N_EPISODES

const auto rl_example_11::N_EPISODES = 1000

◆ POLICY

const std::string rl_example_11::POLICY = "policy.csv"

◆ SERVER_URL

const std::string rl_example_11::SERVER_URL = "http://0.0.0.0:8001/api"