Description Usage Arguments Details Value Examples
View source: R/Monty-Hall-Problem.R
create_game()
starts a new game with three doors, two of which
conceal goats and one which conceals a car.
1 |
... |
no arguments are used by the function. |
The game setup is designed after the TV show "Let's Make a Deal", where a player chooses one of three doors in the hope of revealing a car and not a goat. Once the player select's their first door, the game host opens another door, revealing a goat. Then the player is given the opportunity to stick with their original door selection or swtich to the other unopened door. It has been debated as to whether it is more adventageous to switch doors or to stay with the original selection This simulation allows us to see the odds of winning based on either strategy.
The function returns a length 3 character vector indicating the positions of goats and the car.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.