<commit_before>(*---------------------------------------------------------------------------
 Copyright (c) 2017 <NAME>. All rights reserved.
 Distributed under the ISC license, see terms at the end of the file.
 %%NAME%% %%VERSION%%
 ---------------------------------------------------------------------------*)

(**  Ocaml Multi-Armed Bandits
  
  
Obandit is an OCaml module for multi-armed bandits. It supports the
EXP, UCB and Epsilon-greedy family of algorithms.

  {e Version 0.2 — {{:http://freux.fr/oss/obandit.html }homepage}} 
  {%html: <img src="http://freux.fr/kroliki.jpg" alt="rabbits" width="600"> %} 

  {1:mutband Bandit Modules}

  This library implements multi-armed bandits as modules.
  A bandit module is obtained by calling a functor with a bandit module
  parameter. The parameter usually gives the number $K$ of arms and
  the hyperparameters of the bandit.
  *)

(** A bandit algorithm.  *)
module type Bandit = sig
  type bandit
  (** The internal data structure of the bandit algorithm.*)
  val initialBandit : bandit
  (** The initial state of the bandit algorithm.*)
  val step : bandit -> float -> int * bandit
(** [step r] advances the bandit game one step, where [r] is the reward for
  the last action. The result of this call is the next action, encoded as an
  integer in $ \\{ 0, \cdots , K-1 \\} $, and the new state of the bandit.
  The reward range depends on the bandit algorithm in use and the first reward
  provided to the algorithm is discarded.*)
end

(** 

  $$
  $$<commit_msg>doc fix<commit_after>(*---------------------------------------------------------------------------
 Copyright (c) 2017 <NAME>. All rights reserved.
 Distributed under the ISC license, see terms at the end of the file.
 %%NAME%% %%VERSION%%
 ---------------------------------------------------------------------------*)

(**  Ocaml Multi-Armed Bandits
  
  
Obandit is an Ocaml module for multi-armed bandits. It supports the
EXP, UCB and Epsilon-greedy family of algorithms.

  {e Version 0.2 — {{:http://freux.fr/oss/obandit.html }homepage}} 
  {%html: <img src="http://freux.fr/kroliki.jpg" alt="rabbits" width="600"> %} 

  {1:mutband Bandit Modules}

  This library implements multi-armed bandits as modules.
  A bandit module is obtained by calling a functor with a bandit module
  parameter. The parameter usually gives the number $K$ of arms and
  the hyperparameters of the bandit.
  *)

(** A bandit algorithm.  *)
module type Bandit = sig
  type bandit
  (** The internal data structure of the bandit algorithm.*)
  val initialBandit : bandit
  (** The initial state of the bandit algorithm.*)
  val step : bandit -> float -> int * bandit
(** [step r] advances the bandit game one step, where [r] is the reward for
  the last action. The result of this call is the next action, encoded as an
  integer in $ \\{ 0, \cdots , K-1 \\} $, and the new state of the bandit.
  The reward range depends on the bandit algorithm in use and the first reward
  provided to the algorithm is discarded.*)
end

(** 

  $$
  $$
{'fraction_non_alphanumeric': 0.19107025607353906, 'fraction_numerical': 0.007879185817465528, 'mean_word_length': 2.3119565217391305, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3659230', 'n_tokens_mistral': 878, 'n_tokens_neox': 827, 'n_words': 379}