1#ifndef REINFORCE_MONITOR_H
2#define REINFORCE_MONITOR_H
4#include "bitrl/base/bitrl_config.h"
45 template <typename T,
uint_t index>
49template <typename ActionType, typename StateType>
50template <typename T,
uint_t index>
55 std::vector<T> result;
56 result.reserve(experience.size());
58 auto b = experience.begin();
59 auto e = experience.end();
64 result.push_back(std::get<index>(item));
70template <
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 reinforce_monitor.h:24
void reset() noexcept
Definition reinforce_monitor.h:71
std::vector< real_t > rewards
Definition reinforce_monitor.h:39
std::vector< T > get(const std::vector< experience_tuple_type > &experience) const
bitrl::utils::ExperienceBuffer< experience_tuple_type > experience_buffer_type
Definition reinforce_monitor.h:36
std::vector< real_t > policy_loss_values
Definition reinforce_monitor.h:40
std::tuple< state_type, action_type, real_t, bool, torch_tensor_t > experience_tuple_type
Definition reinforce_monitor.h:34
std::vector< uint_t > episode_duration
Definition reinforce_monitor.h:41
action_type action_type
Definition reinforce_monitor.h:27
state_type state_type
Definition reinforce_monitor.h:26