Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Dead Content [Full Game] The Monty Hall Problem

Dead content awaiting restoration.
The Monty Hall Problem
Coded by: Glitchfinder


Well, this was born through sheer boredom. It's a C++ project, and demonstrates the classical math paradox commonly known as the Monty Hall Problem. Although this doesn't fill the requisite 30+ minutes of game play, I hope that it's in the right place. The best description for the problem is as follows:

Suppose you're on a game show and you're given the choice of three doors. Behind one door is a car; behind the others, goats. The car and the goats were placed randomly behind the doors before the show. The rules of the game show are as follows: After you have chosen a door, the door remains closed for the time being. The game show host, Monty Hall, who knows what is behind the doors, now has to open one of the two remaining doors, and the door he opens must have a goat behind it. If both remaining doors have goats behind them, he chooses one randomly. After Monty Hall opens a door with a goat, he will ask you to decide whether you want to stay with your first choice or to switch to the last remaining door. Imagine that you chose Door 1 and the host opens Door 3, which has a goat. He then asks you "Do you want to switch to Door Number 2?" Is it to your advantage to change your choice?

Although this board requires 5 screenshots, the fact that this is entirely based in the CMD window means that, for the most part, there is no real difference between screenshots, aside from the actual results of the game. However, I will give 5 screens, in an attempt to actually follow the rules of this board.

monty_hall1.png

monty_hall2.png

monty_hall3.png

monty_hall4.png

monty_hall5.png

Game play is actually very simple. You open the executable, and it shows some text and asks you to choose a door. You enter an integer from 1 to 3, and the game reveals the goat. Then, you will be prompted to select whether you want to change doors, or to stick with what you've got. Then, it will print out the results. I'm not entirely certain that it is working properly, so I'd like feedback on that matter. Anyway, the download is below.

Download Here
 
I played it, and it was quite interesting, but I don't get the paradox.


Care to explain a little more? Or should I just google?

Good job Glitch!
 
I was the most unlucky when I picked door 1 first and the most lucky when I picked door 3. I believe that was just a case of random being random though.

Anyway, I always answered y on the second question and I got the car about as often as i expected.
2/3 of the times.
 
Kiriashi":g0glxcfz said:
I played it, and it was quite interesting, but I don't get the paradox.


Care to explain a little more? Or should I just google?

Good job Glitch!

Hi -

Simply put, the Monty Hall problem refers to the basic question: "Should I switch what I have for what is offered?", or "Should I keep what I've got when offered something else?".

The solution that I've read indicates that you shoud always trade away unknowns in order to have a better statistical chance of geting something cool. It's in essence a math puzzle.

Does that sum it up properly Glitchfinder?
 
Falloutfan":3dk65m5i said:
Kiriashi":3dk65m5i said:
I played it, and it was quite interesting, but I don't get the paradox.


Care to explain a little more? Or should I just google?

Good job Glitch!

Hi -

Simply put, the Monty Hall problem refers to the basic question: "Should I switch what I have for what is offered?", or "Should I keep what I've got when offered something else?".

The solution that I've read indicates that you shoud always trade away unknowns in order to have a better statistical chance of geting something cool. It's in essence a math puzzle.

Does that sum it up properly Glitchfinder?

Pretty much, yeah. With the Monty Hall problem, you end up with a 2/3 chance of winning if you switch, as opposed to a 1/3 chance if you keep your first choice. Many mathematicians argued that this was untrue when the problem was first presented, and, although it is generally accepted now, it presents a logical paradox to many who first try their hand at it.
 
YAY!!! I CHOSE 1 AND NO AND GOT A NEW FERRARI.

I better see it tomorrow or I'm sueing.



New experience for me. Never played MUDs before. Different, at the very least.
 
Crystalgate":1qhx8nnb said:
I was the most unlucky when I picked door 1 first and the most lucky when I picked door 3. I believe that was just a case of random being random though.

Anyway, I always answered y on the second question and I got the car about as often as i expected.
2/3 of the times.

Yeah, that could easily be the randomization algorithms for c++. They're nowhere near perfect, which leads to very odd results sometimes.

Daxisheart":1qhx8nnb said:
YAY!!! I CHOSE 1 AND NO AND GOT A NEW FERRARI.

I better see it tomorrow or I'm sueing.



New experience for me. Never played MUDs before. Different, at the very least.

I somehow doubt you'd win that lawsuit, once I pointed out what the game was. Anyway, thanks for the comments guys. I guess a bit of boredom can lead to interesting results.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top