Simulate the 100 prisoners problem.
Project description
Install using pip3 install prisoners_problem
.
Run a couple samples with a given strategy:
>>> from prisoners_problem import simulate
>>> simulate.nsamples(1000, strategy=simulate.try_find_self)
0.3
>>>
help(simulate.nsamples)
should give information for how to put in your own
strategy.
You can run python3 -m prisoners_problem.viz
to show the results of the
visualization.
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
File details
Details for the file prisoners_problem-0.0.10.tar.gz
.
File metadata
- Download URL: prisoners_problem-0.0.10.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bc160d8f7f97c797637869f7e4266013daf4f359d665e7c6fbe31fe9ac5afba |
|
MD5 | b47cc11e153d051dd50143695f21d7b5 |
|
BLAKE2b-256 | 343bc5efb48029354e13bf11b6f3424ae51477ff9cf03213c74f4111e32b2647 |