package prbnmcn-ucb1

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ucb1.MakeSource

Parameters

module Arm : Arm_sig

Signature

Sourcetype 'state t

The state of a bandit.

Sourceval create : Arm.t array -> ready_to_move t

Create a fresh bandit with given arms.

Select the UCB1-optimal action to play. The bandit expects a reward.

Sourceval set_reward : awaiting_reward t -> float -> ready_to_move t

Assign a reward to the bandit. The reward must be in the 0,1 interval.

Sourceval total_rewards : ready_to_move t -> float

Total rewards obtained by the bandit.

Sourceval pp_stats : Format.formatter -> 'state t -> unit

Pretty-print useful statistics on the bandit, for debugging purposes.