1. Go to this page and download the library: Download offdev/bandit library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
offdev / bandit example snippets
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),
);
use Offdev\Bandit\Strategies\EpsilonGreedy;
$strategy = new EpsilonGreedy();
$winningLever = $strategy->solve($machine);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.