33 using Iter = tree<Node>::pre_order_iterator;
62 Bandit(
string type, map<string, float> arms_probs);
98 void set_probs(map<string, float> arms_probs);
119 void update(
string arm,
float reward);
< nsga2 selection operator for getting the front
tree< Node >::pre_order_iterator Iter
void update(string arm, float reward)
Updates the bandit's state based on the chosen arm and the received reward.
string get_type()
Gets the type of the bandit.
vector< string > get_arms()
Gets the arms of the bandit.
void set_type(string type)
Sets the type of the bandit.
void set_arms(vector< string > arms)
Sets the arms of the bandit.
std::map< string, float > probabilities
void set_probs(map< string, float > arms_probs)
Sets the probabilities associated with each arm.
string choose()
Selects an arm.
map< string, float > sample_probs(bool update=false)
Samples the probabilities associated with each arm using the policy.
void set_bandit()
Sets the bandit operator (policy).
std::shared_ptr< BanditOperator > pbandit
A shared pointer to the bandit operator (policy).
map< string, float > get_probs()
Gets the probabilities associated with each arm.