A simple epsilon-greedy multi-armed bandit RL example
Project description
rlbandit
A simple reinforcement learning package implementing an epsilon-greedy multi-armed bandit.
Usage
from rlbandit import run_bandit
result = run_bandit(n_arms=5, epsilon=0.1, trials=1000, seed=42)
print("True probabilities:", result["true_probs"])
print("Total reward:", result["total_reward"])
print("Average reward:", result["average_reward"])
print("Arm counts:", result["counts"])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rlbandit-0.1.0.tar.gz
(2.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rlbandit-0.1.0.tar.gz.
File metadata
- Download URL: rlbandit-0.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9506be99c797bb3225bf17a660e67eddebd4d10ece990c1bf6039bc5e83078fc
|
|
| MD5 |
55a04c47004747dc8662a3aaed52815e
|
|
| BLAKE2b-256 |
c02ebad871103a7b10c2b392ebe873249b21227851ea28ff91fcc90f9e625f23
|
File details
Details for the file rlbandit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rlbandit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e0a874ab630e32d14462f5a59cc109ffad1bbec65ee932ef8f8f740b15a6031
|
|
| MD5 |
da68cf8221e8f2e87ee7156b299e1d63
|
|
| BLAKE2b-256 |
73fad0593ccf967b4f2a3505d2fe9beffb9108f396f0edd3a91d033856a9df19
|