4 ms·
Cool, but I'd have preferred some commentary and explanation, or at least a conclusion. What's the optimal play strategy?
by thurn 15y ago
Cool, but I'd have preferred some commentary and explanation, or at least a conclusion. What's the optimal play strategy?
- hvass 15y agoI believe it is the Monte Hall problem - http://en.wikipedia.org/wiki/Monty_Hall_problem http://en.wikipedia.org/wiki/Monty_Hall_problem Optimal is to always switch.
- ludflu 15y agoHere's my python version, with some commentary. http://datadigger.tumblr.com/post/9709584448/monty-hall http://datadigger.tumblr.com/post/9709584448/monty-hall
- lfrazier 15y ago"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!
- jackfoxy 15y agoI 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.