Class epsilon_greedy_allocator

Inheritance Relationships

Base Type

  • public rer::client< epsilon_greedy_allocator >

Class Documentation

class epsilon_greedy_allocator : public rer::client<epsilon_greedy_allocator>

Allocates a task from a given set of a tasks, using a randomized \(\epsilon\) based method with either logarithmically or linearly bounded regret.

From Auer2002, Pini2012

Public Functions

inline epsilon_greedy_allocator(const config::epsilon_greedy_config *config, rmath::rng *rng)
epsilon_greedy_allocator(const epsilon_greedy_allocator&) = delete
polled_task *operator()(const std::vector<polled_task*> &tasks, size_t alloc_count) const

Perform task allocation.

Parameters:
  • tasks – The current set of tasks.

  • alloc_count – The total number of allocations so far.

const epsilon_greedy_allocator &operator=(const epsilon_greedy_allocator&) = delete

Public Static Attributes

static constexpr const double kC = 5.0
static const std::string kRegretBoundLinear = "linear"
static const std::string kRegretBoundLog = "log"