This simulation is based on the Monty Hall paradox, a probability problem that is based on a game show. The game show host presents the contestant with three doors. Behind one of the doors is a car, and behind the other two doors are goats. The contestant picks a door, and then the host opens one of the other two doors to reveal a goat. The contestant is then given the option to switch doors. The question is: is it in the contestant's best interest to switch doors?
- Just play the game and see what happens.
- Automate the game and run it multiple times to see the results.
- Run the experiment of the simulation with different strategies to see which one is the best. It also prints the table with the relative frequency of wins depending on the number of doors and the strategy.
- Install Ruby
- Clone the repository
- Run the simulation with the following command:
ruby main.rb
- Follow the instructions in the terminal to play the game or run the simulation with different strategies :)
- Enjoy!