10 float uniform_prob = 1.0 / arms.size();
13 for (
const T& arm : arms) {
22 for (
const auto& arm_prob : arms_probs) {
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.
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.
#define HANDLE_ERROR_THROW(err)
< nsga2 selection operator for getting the front