Tag Archives: monty hall paradox

Monty Hall Sneak Peak

Coming Soon: Monty Hall game player in Python.

For now, here is a little teaser:

The 10 billion iteration answer:
>>> monty_hall.play(iter=10000000000)
Ran 10000000000 iterations in 104833.082781s {'wins': 3333340564L, 'losses': 6666659436L}

The code is hosted, of course, on GitHub and can be found here: https://github.com/mutaku/Monty-Hall-Game

As soon as I get the rest of it written up I’ll be posting everything here along with a little code walk-through including a very basic example of Python decorators as well as general object-oriented approaches.