The Monty Hall brainteaser, (
Wikipedia entry) also known as
the 3-doors brainteaser, is a rather popular, but notoriously difficult problem. On a purely mathematical level, it has long been solved and has been used for
various scientific investigations. However, I did not come across an open php implementation of a solution for it, so I implemented my own. I'd be happy for any feedback, though it comes out with the expected results. You can find the results and documented source code
here.