bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
deterministic_action_policy.h
Go to the documentation of this file.
1#ifndef DETERMINISTIC_ACTION_POLICY_H
2#define DETERMINISTIC_ACTION_POLICY_H
3
4#include "cubeai/utils/cubeai_concepts.h"
5#include <type_traits>
6
7namespace cubeai{
8namespace rl {
9namespace policies{
10
15template<utils::concepts::float_or_integral_vector PolicyValuesType, typename StateType>
16requires(std::is_integral<StateType>::value)
18{
19public:
20
21 typedef PolicyValuesType policy_values_type;
22 typedef typename policy_values_type::value_type action_type;
23 typedef StateType state_type;
24
30
34 const action_type& on_state(const state_type& state)const{return policy_values_[state];}
35
36private:
37
38 policy_values_type policy_values_;
39
40};
41
42template<utils::concepts::float_or_integral_vector PolicyValuesType, typename StateType>
43requires(std::is_integral<StateType>::value)
48
49
50
51}
52
53}
54}
55
56#endif // DETERMINISTIC_ACTION_POLICY_H
class DeterministicActionPolicy. a deterministic action apolicy always selects the action indicated
Definition deterministic_action_policy.h:18
policy_values_type::value_type action_type
Definition deterministic_action_policy.h:22
const action_type & on_state(const state_type &state) const
Definition deterministic_action_policy.h:34
PolicyValuesType policy_values_type
Definition deterministic_action_policy.h:21
StateType state_type
Definition deterministic_action_policy.h:23
Definition mc_tree_search_solver.h:22