bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
rl_algorithm_base.h
Go to the documentation of this file.
1#ifndef RL_ALGORITHM_BASE_H
2#define RL_ALGORITHM_BASE_H
3
6
7#include <boost/noncopyable.hpp>
8
9namespace bitrl
10{
11namespace rl::algos
12{
13
17template <typename EnvType> class RLSolverBase : private boost::noncopyable
18{
19
20 public:
21 typedef EnvType env_type;
22
26 virtual ~RLSolverBase() = default;
27
33
39
43 virtual void actions_before_episode_begins(env_type &, uint_t /*episode_idx*/) {}
44
48 virtual void actions_after_episode_ends(env_type &, uint_t /*episode_idx*/,
49 const EpisodeInfo & /*einfo*/)
50 {
51 }
52
56 virtual EpisodeInfo on_training_episode(env_type &, uint_t /*episode_idx*/) = 0;
57
58 protected:
62 RLSolverBase() = default;
63};
64
65} // namespace rl::algos
66} // namespace bitrl
67
68#endif // RL_ALGORITHM_BASE_H
virtual void actions_before_training_begins(env_type &)=0
actions_before_training_begins. Execute any actions the algorithm needs before starting the iteration...
EnvType env_type
Definition rl_algorithm_base.h:21
virtual void actions_before_episode_begins(env_type &, uint_t)
actions_before_training_episode
Definition rl_algorithm_base.h:43
virtual void actions_after_training_ends(env_type &)=0
actions_after_training_ends. Actions to execute after the training iterations have finisehd
virtual ~RLSolverBase()=default
Destructor.
virtual EpisodeInfo on_training_episode(env_type &, uint_t)=0
on_episode Do one on_episode of the algorithm
RLSolverBase()=default
Constructor.
virtual void actions_after_episode_ends(env_type &, uint_t, const EpisodeInfo &)
actions_after_training_episode
Definition rl_algorithm_base.h:48
Definition dp_algo_base.h:15
Various utilities used when working with RL problems.
Definition bitrl_log.h:25
std::size_t uint_t
uint_t
Definition bitsim_types.h:40
The EpisodeInfo struct.
Definition episode_info.h:21