{ "info": { "author": "Simon Muller", "author_email": "samullers@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Other Audience", "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", "Natural Language :: English", "Programming Language :: Python", "Topic :: Games/Entertainment", "Topic :: Games/Entertainment :: Board Games", "Topic :: Utilities" ], "description": "Intro\n-----\n\nA small script for running simulations with dice throws, including\nsituations where you get multiple rerolls and can decide which dice to\nkeep or reroll.\n\nUsage\n-----\n\n::\n\n usage: dice.py [-h] [-n NUM] [-s SIDES] [-ss [SIDES [SIDES ...]]] [-r REROLL]\n [--keep [STRATEGY [STRATEGY ...]]]\n [--stats [REDUCE [REDUCE ...]]] [-N SIMULATIONS] [--counts]\n\n Simulate various dice throw situations.\n\n optional arguments:\n -h, --help Show this help message and exit.\n -n NUM Specify the number of dice to throw.\n -s SIDES Specify the number of sides all dice have.\n -ss [SIDES [SIDES ...]]\n Specify the number of sides for each individual die.\n -r REROLL Perform multiple rerolls (stats only count last roll).\n --keep [STRATEGY [STRATEGY ...]]\n Choose a keeping strategy when performing rerolls.\n Options are: ['none', 'unique', 'duplicate', 'value'].\n --stats [REDUCE [REDUCE ...]]\n Performs multiple throws and outputs cumulative\n results. Provide a parameter to choose an approach for\n reducing a dice throw to a single value of interest.\n Options are: ['count', 'sum', 'unique', 'values',\n 'order'].\n -N SIMULATIONS Set the number of simulations to run for statistical\n results.\n --counts Print actual event counts instead of percentages in\n the statistical results.\n\nExamples\n--------\n\n::\n\n ./dice.py\n [6]\n\n ./dice.py -n 2\n [6, 5]\n\n ./dice.py -n 2 --stats sum\n Total sum of dice values in a throw:\n 2: 2.50 %\n 3: 4.50 %\n 4: 7.70 %\n 5: 11.20 %\n 6: 14.70 %\n 7: 19.20 %\n 8: 13.40 %\n 9: 9.80 %\n 10: 8.40 %\n 11: 5.60 %\n 12: 3.00 %\n\n ./dice.py -n 2 --stats count 1 6\n Number of dice with the value [1, 6]:\n 0: 44.80 %\n 1: 43.60 %\n 2: 11.60 %\n\n ./dice.py -n 6 -r 3\n [6, 5, 3, 2, 4, 3]\n [5, 2, 3, 4, 6, 4]\n [2, 5, 4, 2, 6, 6]\n\n ./dice.py -n 6 -r 3 --keep value 3\n [6, 5, 3, 2, 4, 3]\n [3, 3, 5, 2, 3, 4]\n [3, 3, 3, 6, 4, 2]\n\n ./dice.py -n 6 -r 3 --keep value 3 --stats count 3\n Number of dice with the value [3]:\n 0: 4.50 %\n 1: 16.30 %\n 2: 26.70 %\n 3: 31.20 %\n 4: 15.70 %\n 5: 5.10 %\n 6: 0.50 %\n\nTerminology\n-----------\n\n- Keep strategy: a strategy used to decide which dice to keep between\n rerolls\n- Reduction function: a function for reducing a dice throw result to a\n single value of interest\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/samuller/dice", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dice-sim", "package_url": "https://pypi.org/project/dice-sim/", "platform": "", "project_url": "https://pypi.org/project/dice-sim/", "project_urls": { "Homepage": "https://github.com/samuller/dice" }, "release_url": "https://pypi.org/project/dice-sim/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Simulate various dice throw situations", "version": "1.0.0" }, "last_serial": 3618382, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "71260138be200dd32eb80f5139b0da20", "sha256": "f3fc39f26cce37941de2a086ebb017c16a084d644c9b31d57a716ce5d60730de" }, "downloads": -1, "filename": "dice_sim-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "71260138be200dd32eb80f5139b0da20", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8247, "upload_time": "2018-02-26T18:54:02", "url": "https://files.pythonhosted.org/packages/1b/87/07ce2598897bf2069a209d6bd67d6e94ea67b2ad91ef78f075a0ed03e768/dice_sim-1.0.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "71260138be200dd32eb80f5139b0da20", "sha256": "f3fc39f26cce37941de2a086ebb017c16a084d644c9b31d57a716ce5d60730de" }, "downloads": -1, "filename": "dice_sim-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "71260138be200dd32eb80f5139b0da20", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8247, "upload_time": "2018-02-26T18:54:02", "url": "https://files.pythonhosted.org/packages/1b/87/07ce2598897bf2069a209d6bd67d6e94ea67b2ad91ef78f075a0ed03e768/dice_sim-1.0.0-py2.py3-none-any.whl" } ] }