2017 © Pedro Peláez
 

library bandit

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

image

offdev/bandit

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

  • Thursday, February 1, 2018
  • by offdev
  • Repository
  • 1 Watchers
  • 8 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Offdev/Bandit

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem, (*1)

Latest Stable Version Minimum PHP Version Build Status License, (*2)

Requirements

  • PHP >= 7.4
  • Composer

Installation

$ composer require offdev/bandit

General Usage

First, you need to set up a machine, and its possible levers. A lever might have already been pulled a few times, and some levers may also have rewarded the lucky person which pulled it, so adjust those numbers accordingly. Example:, (*3)

use Offdev\Bandit\Lever;
use Offdev\Bandit\Machine;

$machine = new Machine(
    new Lever('first-lever', 123, 1),
    new Lever('second-lever', 108, 3),
    new Lever('third-lever', 115, 0),
);

Now you need a strategy to solve your problem. See this link for more information about strategies, and have a look at the example ones I have included in src/php/Strategies. Example:, (*4)

use Offdev\Bandit\Strategies\EpsilonGreedy;

$strategy = new EpsilonGreedy();
$winningLever = $strategy->solve($machine);

It is as simple as that :), (*5)

TODO

Add more docs :), (*6)

The Versions

01/02 2018

dev-master

9999999-dev https://github.com/offdev/bandit

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

  Sources   Download

Apache-2.0 Apache License 2.0

The Requires

  • php >=7

 

The Development Requires

test testing multi bandit offdev armed

17/02 2017

1.0.0

1.0.0.0 https://github.com/offdev/bandit

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

  Sources   Download

Apache License 2.0

The Requires

  • php >=7

 

The Development Requires

test testing multi bandit offdev armed

13/08 2016

0.1.1

0.1.1.0 https://github.com/offdev/bandit

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

  Sources   Download

Apache License 2.0

The Requires

  • php >=7

 

The Development Requires

test testing multi bandit offdev armed

13/08 2016

v0.1.0

0.1.0.0 https://github.com/offdev/bandit

An A/B/x testing algorithm written in PHP by implementing the solution to the multi armed bandit problem

  Sources   Download

Apache License 2.0

The Requires

  • php >=7

 

The Development Requires

test testing multi bandit offdev armed