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

Classes

struct  ActorImpl
struct  CriticImpl
class  TorchCategorical

Typedefs

typedef bitrl::envs::gymnasium::CartPole env_type
typedef bitrl::rl::algos::pg::PPOSolver< env_type, Actor, Critic > solver_type
using real_t
 real_t
typedef torch::Tensor torch_tensor_t
 torch_tensor_t
using uint_t
 uint_t

Functions

torch_tensor_t to_tensor (const std::vector< real_t > &state)
 TORCH_MODULE (Actor)
 TORCH_MODULE (Critic)

Variables

const std::string SERVER_URL = "http://0.0.0.0:8001/api"
const uint_t SEED = 42
const uint_t N_EPISODES = 500
const uint_t MAX_STEPS = 500
const real_t LEARNING_RATE = 0.001

Typedef Documentation

◆ env_type

◆ real_t

◆ solver_type

◆ torch_tensor_t

typedef torch::Tensor bitrl::torch_tensor_t

◆ uint_t

Function Documentation

◆ to_tensor()

torch_tensor_t ppo_cartpole::to_tensor ( const std::vector< real_t > & state)

◆ TORCH_MODULE() [1/2]

ppo_cartpole::TORCH_MODULE ( Actor )

◆ TORCH_MODULE() [2/2]

ppo_cartpole::TORCH_MODULE ( Critic )

Variable Documentation

◆ LEARNING_RATE

const real_t ppo_cartpole::LEARNING_RATE = 0.001

◆ MAX_STEPS

const uint_t ppo_cartpole::MAX_STEPS = 500

◆ N_EPISODES

const uint_t ppo_cartpole::N_EPISODES = 500

◆ SEED

const uint_t ppo_cartpole::SEED = 42

◆ SERVER_URL

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