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)
To start the simulation, type node montyhall
The code has been written to optimize for performance.
// Settings
const attempts = 10000; // Number of games to run.
const do_switch = true; // Whether to switch doors or not.