4#include "bitrl/base/bitrl_config.h"
23template <
typename ActionType,
typename StateType>
struct A2CMonitor
47 template <typename T,
uint_t index>
51template <typename ActionType, typename StateType>
52template <typename T,
uint_t index>
57 std::vector<T> result;
58 result.reserve(experience.size());
60 auto b = experience.begin();
61 auto e = experience.end();
66 result.push_back(std::get<index>(item));
72template <
typename ActionType,
typename StateType>
The ExperienceBuffer class. A buffer based on boost::circular_buffer to accumulate items of type Expe...
Definition experience_buffer.h:28
Definition dp_algo_base.h:15
Definition dummy_agent.h:9
Various utilities used when working with RL problems.
Definition bitrl_log.h:25
torch::Tensor torch_tensor_t
torch_tensor_t
Definition bitrl_types.h:95
std::size_t uint_t
uint_t
Definition bitsim_types.h:40
double real_t
real_t
Definition bitsim_types.h:20
Definition a2c_monitor.h:24
action_type action_type
Definition a2c_monitor.h:27
std::vector< real_t > critic_loss_values
Definition a2c_monitor.h:42
void reset() noexcept
Definition a2c_monitor.h:73
std::vector< real_t > rewards
Definition a2c_monitor.h:40
std::tuple< state_type, action_type, real_t, bool, torch_tensor_t, torch_tensor_t > experience_tuple_type
Definition a2c_monitor.h:35
bitrl::utils::ExperienceBuffer< experience_tuple_type > experience_buffer_type
Definition a2c_monitor.h:37
std::vector< T > get(const std::vector< experience_tuple_type > &experience) const
std::vector< uint_t > episode_duration
Definition a2c_monitor.h:43
std::vector< real_t > policy_loss_values
Definition a2c_monitor.h:41
state_type state_type
Definition a2c_monitor.h:26