A package for exploring roulette strategies.
Project description
pyroulette
Explanation
-
A
Player
has aStrategy
which is comprised of a list ofPlacements
, which represent a collectiveBet
. -
The player will stick to their strategy.
-
Winnings are re-invested (todo: allow specifying player's pyschology, e.g. pocket winnings of certain proportion)
-
A player's placement cannot be too complicated (max is 10)
-
A
Strategy
is formed at random based on exhausting the strategy budget, which is determined by considering the player's total budget and the minimum number of games they desire to play.- It is possible to have some money left over (either due to reaching the maximum number of placements or not having enough money to place a bet with the remaining available chips), meaning the strategy budget is less than the cost to play the strategy.
- When players cannot play their strategy anymore, they leave the game, meaning they can end the simulation with some remaining money (e.g. $100 to play a $40 strategy that you lose twice in a row will leave you with $20 remaining).
-
When using
generate_players
, all players will have the same number of minimum games and budget.
how to use
pip install pyroulette
from pyroulette import generate_players, play_roulette
players = generate_players(
number_of_players=10,
minimum_number_of_games=10,
budget=100,
)
for player in results:
print(player)
results = play_roulette(
players=players,
number_of_games=1000,
)
uploading to pypi
pip install build
python -m build --sdist --wheel -n
twine upload dist/*
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
Built Distribution
File details
Details for the file pyroulette-0.0.1.tar.gz
.
File metadata
- Download URL: pyroulette-0.0.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9025d64861f9b93f9cd4687da1299b1ef1dd1600b7f91b4094aefc8a8a049e42 |
|
MD5 | 749813477b72d5a19e65aa4ac539b2c8 |
|
BLAKE2b-256 | 24f6dad918888df4a88b30f1cf82552173d3cae74a7dd287a232991d9ad639f7 |
File details
Details for the file pyroulette-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyroulette-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb80b4486d6d6ddef7b3a067af939dc5b3834e4f09653158784438c94f55abfe |
|
MD5 | fb511f3da41f64ad8c5d83cbe60613de |
|
BLAKE2b-256 | 0ed1cc9b7edb93e17f12be84e94dbe81d9ac9d32ddf99193e78cc8c857bccbb8 |