9 float uniform_prob = 1.0 / arms.size();
12 for (
const string& arm : arms) {
20 for (
const auto& arm_prob : arms_probs) {
std::map< string, float > probabilities
virtual void update(string arm, float reward)
Updates the reward for a specific arm.
virtual string choose()
Chooses an arm based on the given tree and fitness. Should call sample_probs internally.
BanditOperator(vector< string > arms)
Constructs a BanditOperator object with a vector of arms.
virtual std::map< string, float > sample_probs(bool update)
Samples the probabilities of the arms.
#define HANDLE_ERROR_THROW(err)
< nsga2 selection operator for getting the front