|
bitsim
Model, simulate, estimate and control robots in C++
|
Classes | |
| class | PolicyNetImpl |
| class | CartPole |
| The CartPole class Interface for CartPole environment. 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 | ReinforceConfig |
| The ReinforceOpts struct. Holds various configuration options for the Reinforce algorithm. More... | |
| class | ReinforceSolver |
| The ReinforceSolver class. The ReinforceSolver trains a policy represented by the PolicyTp template parameter on the environment represented by the EnvType parameter. More... | |
Typedefs | |
| typedef CartPole | env_type |
| typedef PolicyNet | policy_type |
| typedef ReinforceSolver< env_type, PolicyNet > | solver_type |
| using | float_t |
| float | |
| using | int_t |
| integer type | |
| using | real_t |
| real_t | |
| typedef torch::Tensor | torch_tensor_t |
| torch_tensor_t | |
| using | uint_t |
| uint_t | |
| using | float_t |
| float | |
| using | int_t |
| integer type | |
| 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... | |
| enum class | BaselineEnumType |
| Enumeration of the baseline types supported. More... | |
Functions | |
| TORCH_MODULE (PolicyNet) | |
Variables | |
| const std::string | SERVER_URL = "http://0.0.0.0:8001/api" |
| const std::string | EXPERIMENT_ID = "2" |
| const std::string | POLICY = "policy.csv" |
| const uint_t | L1 = 4 |
| const uint_t | L2 = 128 |
| const uint_t | L3 = 2 |
| const real_t | LEARNING_RATE = 0.01 |
This example illustrates how to use the REINFORCE algorithm on the CartPole environment from Gymnasium
| typedef CartPole rl_example_13::env_type |
| using bitsim::float_t |
float
| using bitsim::float_t |
float
| using bitsim::int_t |
integer type
| using bitsim::int_t |
integer type
| typedef PolicyNet rl_example_13::policy_type |
| using bitsim::real_t |
| using bitsim::real_t |
| typedef ReinforceSolver< env_type, PolicyNet > rl_example_13::solver_type |
| typedef torch::Tensor bitrl::torch_tensor_t |
| typedef torch::Tensor bitrl::torch_tensor_t |
| using bitsim::uint_t |
| using bitsim::uint_t |
|
strong |
Enumeration of the baseline types supported.
|
strong |
Enumeration of various device types.
|
strong |
Enumeration of various device types.
| rl_example_13::TORCH_MODULE | ( | PolicyNet | ) |
| const std::string rl_example_13::EXPERIMENT_ID = "2" |
| const uint_t rl_example_13::L1 = 4 |
| const uint_t rl_example_13::L2 = 128 |
| const uint_t rl_example_13::L3 = 2 |
| const real_t rl_example_13::LEARNING_RATE = 0.01 |
| const std::string rl_example_13::POLICY = "policy.csv" |
| const std::string rl_example_13::SERVER_URL = "http://0.0.0.0:8001/api" |