AIToolbox
A library that offers tools for AI problem solving.
TypeTraits.hpp
Go to the documentation of this file.
1 #ifndef AI_TOOLBOX_POMDP_TYPE_TRAITS_HEADER_FILE
2 #define AI_TOOLBOX_POMDP_TYPE_TRAITS_HEADER_FILE
3 
6 
7 namespace AIToolbox::POMDP {
28  template <typename M>
29  concept IsGenerativeModel = MDP::IsGenerativeModel<M> && requires (M m) {
30  { m.sampleSOR(m.getS(), m.getA()) } -> std::convertible_to<std::tuple<size_t, size_t, double>>;
31  };
32 
51  template <typename M>
52  concept IsModel = MDP::IsModel<M> && IsGenerativeModel<M> && HasIntegralObservationSpace<M> && requires (M m, size_t s, size_t a) {
53  { m.getObservationProbability(s, a, s) } -> std::convertible_to<double>;
54  };
55 
73  template <typename M>
74  concept IsModelEigen = MDP::IsModelEigen<M> && IsModel<M> && requires (M m, size_t a) {
75  m.getObservationFunction(a);
76  requires IsDerivedFromEigen<std::remove_cvref_t<decltype((m.getObservationFunction(a)))>>;
77  };
78 }
79 
80 #endif
AIToolbox::POMDP
Definition: AMDP.hpp:14
AIToolbox::POMDP::IsModelEigen
concept IsModelEigen
This concept represents the required interface that allows POMDP algorithms to leverage Eigen.
Definition: TypeTraits.hpp:74
AIToolbox::IsDerivedFromEigen
concept IsDerivedFromEigen
This concept simplifies checking for non-void.
Definition: TypeTraits.hpp:66
Types.hpp
TypeTraits.hpp
AIToolbox::POMDP::IsModel
concept IsModel
This concept represents the required interface for a POMDP Model.
Definition: TypeTraits.hpp:52
AIToolbox::POMDP::IsGenerativeModel
concept IsGenerativeModel
This concept represents the required interface for a generative POMDP.
Definition: TypeTraits.hpp:29