bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
policy_base.h
Go to the documentation of this file.
1#ifndef POLICY_BASE_H
2#define POLICY_BASE_H
3
4#include "cubeai/rl/policies/policy_type.h"
5#include <ostream>
6
7namespace cubeai {
8namespace rl {
9namespace policies {
10
15{
16public:
17
21 virtual ~PolicyBase() = default;
22
27 PolicyType type()const noexcept{return type_;}
28
32 virtual std::ostream& print(std::ostream& out)const = 0;
33
34
35protected:
36
41
46};
47
48inline
50 :
51 type_(type)
52{}
53
54
55inline
56std::ostream& operator<<(std::ostream& out, const PolicyBase& p){
57 return p.print(out);
58}
59
60}
61}
62}
63
64#endif // POLICY_BASE_H
The PolicyBase class.
Definition policy_base.h:15
PolicyBase(PolicyType type)
Definition policy_base.h:49
virtual ~PolicyBase()=default
~PolicyBase. Destructor
virtual std::ostream & print(std::ostream &out) const =0
print
PolicyType type() const noexcept
type. Returns the policy identifier type
Definition policy_base.h:27
PolicyType type_
type_
Definition policy_base.h:45
PolicyType
Definition policy_type.h:8
std::ostream & operator<<(std::ostream &out, const PolicyBase &p)
Definition policy_base.h:56
Definition mc_tree_search_solver.h:22