[][src]Crate ratel_bandit

Ratel

A library for running multi-armed bandit simulations.

The simulation has two components: a Bandit with some number of arms which each has a payout according to some distribution, and an Agent that uses some strategy to learn the optimal bandit arm. A Game then consists of an Agent learning about a Bandit by pulling arms according to its preferred strategy.

Structs

BinomialBandit

A bandit whose arms distribute rewards according to the binomial distributions.

EpsilonGreedyAgent

Agent that follows the Epsilon-Greedy Algorithm.

ExponentialBandit

A bandit whose arms distribute rewards according to the exponential distributions.

Game

Structure to make the Agent interact with the Bandit.

GammaBandit

A bandit whose arms distribute rewards according to the gamma distributions.

GaussianBandit

A bandit whose arms distribute rewards according to the Gaussian distributions.

GreedyAgent

Agent that follows the Greedy Algorithm.

HarmonicStepper

Stepper with a harmonically decreasing step size.

LogNormalBandit

A bandit whose arms distribute rewards according to the Log Normal distributions.

OptimisticAgent

Agent that follows the Optimistic Algorithm.

RecordCounter

Counter for cases where individual records must be maintained.

Traits

Agent

A trait for common members of the Agents.

Bandit

A trait for common members of the Bandits

Counter

A trait for common methods required by all counters.

Stepper

Trait containing all methods required by all steppers.

Functions

print_hms

Prints the amount of time that has elapsed since a timer was started.