Clarify README
Add BSD 3-clause license
Make warning prettier with `-v` enabled
This project simulates win rate of using the "switch to unopened door every time" strategy in the Monty Hall problem. It is slightly configurable. You can give it the number of iterations you want to perform, how many doors your want to simulate (defaults to the classic 3), and specify how many concurrent instances of the simulation you want to run.
Typical straightforward Go build process. Install Go to your system, navigate to this cloned repo directory, and:
go build .
That will compile an executable. Now, to run the simulation:
./montyhallauto
That will run the simulation with the defaults (3 doors, 10 iterations, 1 instance).
Here's a better (assuming you have at least a quad-core CPU), more accurate simulation:
./montyhallauto -n 1000000 -d 5 -c 4
That will run the Monty Hall problem with 5 doors, 1 million times, using 4 goroutines. Increasing -c
only yields performance improvements for systems with at least that many cores/threads available.