brpy / 100-prisoners-problem

Simulation of 100 Prisoners Problem using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simulation of 100 Prisoners Problem using Python and Numpy:


100 Prisoners Problem:

Came across this interesting problem from veritasium's youtube channel

100 Prisoners Problem


How to run:

git clone github.com/brpy/100-prisoners-problem/
cd 100-prisoners-problem

python -m pip install -r requirements.txt
python simulate.py

Options:

python simulate.py -N <no. of simulations> -n <no. of prisoners>

by default, N = 1000, n = 100

About

Simulation of 100 Prisoners Problem using Python


Languages

Language:Python 100.0%