RL utilities and demos.
Project description
rl-soumya
rl-soumya provides tiny building blocks for experimenting with reinforcement-learning ideas.
The current release ships a reference implementation of a simple epsilon-greedy multi-armed
bandit loop and a CLI demo that shows it in action.
Installation
pip install rl-soumya
Usage
from rl_soumya import train_epsilon_greedy
# Create reward generators for each arm
def make_generator(mean):
while True:
yield mean
arms = [make_generator(0.4), make_generator(0.6), make_generator(0.9)]
rewards = train_epsilon_greedy(arms, epsilon=0.05, steps=500)
print(f"Total reward collected: {rewards[-1]:.2f}")
Run the included demo from a shell:
python -m rl_soumya.main
Development
python3.11 setup.py sdist bdist_wheel
pip install dist/rl_soumya-0.1-py3-none-any.whl
License
MIT
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
rl_soumya-0.1.tar.gz
(2.5 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 rl_soumya-0.1.tar.gz.
File metadata
- Download URL: rl_soumya-0.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e032d9162d4ce06295ecbbb5f7d1175fd787457739f3da98acb3e0063c20e5b6
|
|
| MD5 |
5e9b731cd021def67b65159531da3db3
|
|
| BLAKE2b-256 |
3291dc30dd0915d01a4b3ec7a4646d56d7ad29d837bc22d185956bd0348bb56d
|
File details
Details for the file rl_soumya-0.1-py3-none-any.whl.
File metadata
- Download URL: rl_soumya-0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33744ef620fee530308d90a8f81128c1601648cd201bd96c4aca77a942d7803e
|
|
| MD5 |
9083805ee904bd26cdb1afe91d33897f
|
|
| BLAKE2b-256 |
1a7656362674d62b40ae551eb86ee0319e68ab8ea23a12567419babef428714a
|