Results 1 to 6 of 6

Thread: [WPF/VB.Net] Monty Hall Puzzle demo

Threaded View

  1. #1

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    [WPF/VB.Net] Monty Hall Puzzle demo

    I stumbled upon something rather interesting on YouTube yesterday called the Monty Hall Problem. Imagine you were given 3 doors from which you can choose one. Behind one of these doors is a prize but you do not know which door it's behind so you must guess. This means you have a 1 in 3 chance of choosing the correct one. Now lets say you are asked to choose a door and after making that choice, one of the doors which do not host the prize is revealed to you. This leaves you with the door you chose and another door. Now, you are offered the chance to either change your choice or stay with the choice you made, what would you do?

    This is where it got interesting. Everyone's first instinct, including mine was to believe the odds of picking the correct answer goes down from 1 in 3 to a 1 in 2 chance. Better odds than before but it feels like 50/50 whether or not you change your choice after the false door was revealed. It turns out that the best option is to actually change your choice. This puzzle fooled a lot of very intelligent and highly educated people. I'm not going to bore you with the details of all this and the technical details behind this puzzle. You can check out video yourself where it's all explained:-


    Nonetheless, I found this puzzle rather intriguing and I didn't really understand it at first so I wrote a small WPF application to actually test whether always choosing a different door after a reveal of false doors really does improve the odds, which of course they absolutely did. The application even allows you to go beyond just 3 doors which will very quickly give you a solid intuition for why this puzzle works the way it does.

    See the attachment for the application. You will need Visual Studio 2022 to open it.

    Here is a small video of me demonstrating how to use the application.


    Have fun.
    Attached Files Attached Files
    Last edited by Niya; Mar 17th, 2022 at 06:40 AM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width