News for hackers. Stuff that matters.
Re:F# Bayesian Monte Carlo of Let's Make a Deal by thurn on Sunday April 08, 2012 @12:28AM (#3813060)
Cool, but I'd have preferred some commentary and explanation, or at least a conclusion. What's the optimal play strategy?
Re:F# Bayesian Monte Carlo of Let's Make a Deal by jackfoxy on Sunday April 08, 2012 @12:48PM (#3814235)
I intentionally didn't do a write-up of Bayes' Theorem or this particular problem because there is so much literature about it on the web, but you did inspire me to add this comment:

The following source statement illustrates the essence of this problem as an example of Bayes' Theorem. There are two posterior situations, in one case there are two possible succeeding events, each with one-half probability. In the other case only one succeeding event is possible with 100% probability. before the source statement

let revealedDoor =

    if (doorWithPrize = fstChoice) then rndReveal doorWithPrize

    else forcedReveal doorWithPrize fstChoice
I think F# does a rather nice job of letting you write source code that reveals the intention of what the code is doing.
Re:F# Bayesian Monte Carlo of Let's Make a Deal by hvass on Sunday April 08, 2012 @01:14AM (#3813151)
I believe it is the Monte Hall problem - http://en.wikipedia.org/wiki/Monty_Hall_problem

Optimal is to always switch.

Re:F# Bayesian Monte Carlo of Let's Make a Deal by ludflu on Sunday April 08, 2012 @07:58AM (#3813640)
Here's my python version, with some commentary. http://datadigger.tumblr.com/post/9709584448/monty-hall
Re:F# Bayesian Monte Carlo of Let's Make a Deal by lfrazier on Sunday April 08, 2012 @12:06PM (#3814120)
"What I didn’t realize is that the real choice is this:

what’s behind the door you originally picked what’s behind BOTH of the other doors, minus the goat"

Mind blown. I've been trying for a long time to understand this intuitively, thank you!