https://github.com/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.
https://github.com/manome/python-mab
bandits multi-armed-bandits reinforcement-learning stochastic-bandit-algorithms stochastic-multi-armed-bandits survival-multi-armed-bandits
Last synced: 7 months ago
JSON representation
This project provides a simulation of multi-armed bandit problems. This implementation is based on the below paper. https://arxiv.org/abs/2308.14350.
- Host: GitHub
- URL: https://github.com/manome/python-mab
- Owner: manome
- License: bsd-3-clause
- Created: 2023-08-08T09:58:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T16:20:55.000Z (8 months ago)
- Last Synced: 2024-11-07T17:27:44.878Z (8 months ago)
- Topics: bandits, multi-armed-bandits, reinforcement-learning, stochastic-bandit-algorithms, stochastic-multi-armed-bandits, survival-multi-armed-bandits
- Language: Python
- Homepage:
- Size: 1.2 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
- scikit-optimize## Installation
```
$ pip install numpy
$ pip install matplotlib
```## Quickstart StochasticMAB
```
$ python compare_stochastic_mab.py
```The results are displayed as below.
![]()
![]()
For more information, [compare_stochastic_mab.py](compare_stochastic_mab.py).
## Quickstart SurvivalMAB
```
$ python compare_survival_mab.py
```The results are displayed as below.
![]()
![]()
For more information, [compare_survival_mab.py](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.