1#ifndef BANDIT_OPERATOR_H
2#define BANDIT_OPERATOR_H
24 using Iter = tree<Node>::pre_order_iterator;
57 virtual T
choose(
const VectorXf& context);
65 virtual void update(T arm,
float reward, VectorXf& context);
virtual std::map< T, float > sample_probs(bool update)
Samples the probabilities of the arms.
virtual T choose(const VectorXf &context)
Chooses an arm based on the given tree and fitness. Should call sample_probs internally.
tree< Node >::pre_order_iterator Iter
BanditOperator(vector< T > arms)
Constructs a BanditOperator object with a vector of arms.
std::map< T, float > probabilities
virtual void update(T arm, float reward, VectorXf &context)
Updates the reward for a specific arm.
< nsga2 selection operator for getting the front