bitsim
Model, simulate, estimate and control robots in C++
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
5#include <type_traits>
6#include <utility>
7
8namespace bitrl
9{
10namespace rl
11{
12namespace policies
13{
14
19template <utils::concepts::float_or_integral_vector PolicyValuesType, typename StateType>
20requires(std::is_integral<StateType>::value) class DeterministicActionPolicy
21{
22 public:
23 typedef PolicyValuesType policy_values_type;
24 typedef typename policy_values_type::value_type action_type;
25 typedef StateType state_type;
26
32
36 const action_type &on_state(const state_type &state) const { return policy_values_[state]; }
37
38 private:
39 policy_values_type policy_values_;
40};
41
42template <utils::concepts::float_or_integral_vector PolicyValuesType, typename StateType>
43requires(std::is_integral<StateType>::value)
49
50} // namespace policies
51
52} // namespace rl
53} // namespace bitrl
54
55#endif // DETERMINISTIC_ACTION_POLICY_H
PolicyValuesType policy_values_type
Definition deterministic_action_policy.h:23
StateType state_type
Definition deterministic_action_policy.h:25
DeterministicActionPolicy(policy_values_type &&values)
DeterministicActionPolicy.
Definition deterministic_action_policy.h:44
const action_type & on_state(const state_type &state) const
Definition deterministic_action_policy.h:36
policy_values_type::value_type action_type
Definition deterministic_action_policy.h:24
Definition policy_stochastic_adaptor.h:21
Definition dummy_agent.h:9
Various utilities used when working with RL problems.
Definition bitrl_log.h:25