Skip to content

AspectOfJerry/monty-hall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

The Monty Hall problem

The Monty Hall problem is a brain-teaser, in the form of a probability puzzle, loosely based on the American television game show Let's Make a Deal and named after its original host, Monty Hall. (source)

Run the code

To start the simulation, type node montyhall The code has been written to optimize for performance.

Simulation settings

// Settings
const attempts = 10000; // Number of games to run.
const do_switch = true; // Whether to switch doors or not.