manome / python-mab

This project provides a simulation of multi-armed bandit problems. This implementation is based on the below paper. https://arxiv.org/abs/2308.14350.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-armed bandit problems

This project provides a simulation of multi-armed bandit problems.

This implementation is based on the below paper. Simple Modification of the Upper Confidence Bound Algorithm by Generalized Weighted Averages (https://arxiv.org/abs/2308.14350).

Requirements

Compatible with Python3.6 and above. The required libraries are listed below.

  • NumPy
  • matplotlib

Installation

$ pip install numpy
$ pip install matplotlib

Quickstart StochasticMAB

$ python compare_stochastic_mab.py

The results are displayed as below.

Execution result of compare_stochastic_mab.py

Execution result of compare_stochastic_mab.py

For more information, compare_stochastic_mab.py.

Quickstart SurvivalMAB

$ python compare_survival_mab.py

The results are displayed as below.

Execution result of compare_survival_mab.py

Execution result of compare_survival_mab.py

For more information, compare_survival_mab.py.

Experiments in the paper

The three experiments described in the paper can be executed with the following commands.

$ python experiment1.py
$ python experiment2.py
$ python experiment3.py

License

This is free and open-source software licensed under the 3-clause BSD license.

About

This project provides a simulation of multi-armed bandit problems. This implementation is based on the below paper. https://arxiv.org/abs/2308.14350.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%