Skip to main content

Bandit Code for the Book "Reinforcement Learning"

This repository was forked from John Myles White's "BanditsBook" repository.

I have removed all the non-python code and added a setup.py file to allow for pip installs. Everything else is the same.

Installing

pip install banditsbook

Getting Started

from arms.bernoulli import BernoulliArm
from testing_framework.tests import test_algorithm
from algorithms.epsilon_greedy.standard import EpsilonGreedy
num_sims = 1000
horizon = 10

arm0 = BernoulliArm(0.2)
arm1 = BernoulliArm(0.2)
arms = [arm0, arm1]
algo1 = EpsilonGreedy(0.1, [], [])
sim_nums, times, chosen_arms, rewards, cumulative_rewards = test_algorithm(
    algo1, arms, num_sims, horizon)
print(rewards)

See the original repository for more information: https://github.com/johnmyleswhite/BanditsBook

Icons made by Good Ware from www.flaticon.com

Metadata

Release files for banditsbook 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for banditsbook 0.1.1
File Size Uploaded Provenance Actions
banditsbook-0.1.1.tar.gz 6.0 kB Without provenance Details for banditsbook-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for banditsbook 0.1.1
File Interpreter ABI Platform Actions
banditsbook-0.1.1-py3-none-any.whl Python 3 none any Details for banditsbook-0.1.1-py3-none-any.whl

Total release size: 20.1 kB

Release files / banditsbook-0.1.1.tar.gz

Download URL banditsbook-0.1.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
76f1e78ebf8a18c07924dc2e64924727c6028a0a7fe5e45928886adbf85b9554
BLAKE2b-256 checksum
How to use checksums
409c9f1c5654bf1f4d71c8ec594e2d99bbe80451e3dc7a1918a587dc6766fa32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / banditsbook-0.1.1-py3-none-any.whl

Download URL banditsbook-0.1.1-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54040cad53012ddfd5fabc1e6afcdd40c7ee1201e8868339528dccc8ce1f089f
BLAKE2b-256 checksum
How to use checksums
68c0afdf81ebc086acae3f536424922716a1f2fa8a45fec573e6a62e0d01136f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for banditsbook 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page