Skip to main content

A package for exploring roulette strategies.

Project description

pyroulette

Explanation

  • A Player has a Strategy which is comprised of a list of Placements, which represent a collective Bet.

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyroulette-0.0.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

pyroulette-0.0.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pyroulette-0.0.2.tar.gz.

File metadata

  • Download URL: pyroulette-0.0.2.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

Hashes for pyroulette-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4fabb06c07d9f0c869663664ee4119601879fe2d16265f34a0c725472d1bf6e4
MD5 64eb4ef43fc1d9ed15cebc9ec62591a1
BLAKE2b-256 4df1dcc49c9e614886328e809f7a366b385a0c9e0eac2422a692624c41aa2391

See more details on using hashes here.

File details

Details for the file pyroulette-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyroulette-0.0.2-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

Hashes for pyroulette-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1829b7d44931c0b41059edde4af206227a192dff3ec74c03da4f70b50cc783c0
MD5 f21a3ee2258c30d466985e1600566acb
BLAKE2b-256 47cbee9c245c898efd9730ef3611c56f909255ef0c9560f58d87ad6dc42e7053

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page