AIToolbox
A library that offers tools for AI problem solving.
|
Go to the documentation of this file. 1 #ifndef AI_TOOLBOX_FACTORED_BANDIT_MODEL_HEADER_FILE
2 #define AI_TOOLBOX_FACTORED_BANDIT_MODEL_HEADER_FILE
28 template <
typename Dist>
46 template <
typename... TupleArgs>
66 const std::vector<PartialKeys> &
getGroups()
const;
71 const std::vector<AIToolbox::Bandit::Model<Dist>> &
getArms()
const;
75 std::vector<PartialKeys> groups_;
77 mutable std::vector<AIToolbox::Bandit::Model<Dist>> arms_;
81 template <
typename Dist>
82 template <
typename... TupleArgs>
84 A(std::move(a)), groups_(std::move(deps)), arms_(std::move(arms)),
92 assert(groups_.size() == arms_.size());
94 for (
size_t i = 0; i < groups_.size(); ++i) {
98 assert(bSize == arms_[i].
getA());
102 template <
typename Dist>
104 for (
size_t i = 0; i < groups_.size(); ++i) {
107 rews_[i] = arms_[i].sampleR(aid);
113 template <
typename Dist>
115 template <
typename Dist>
117 template <
typename Dist>