## INFORMATION ## This program simulates the popular Monty Hall game. For information about the game, go to the wikipedia page: http://en.wikipedia.org/wiki/Monty_Hall_problem For information about the program visit my blog page: http://thealarmclocksixam.wordpress.com/2012/06/23/c-simulator-for-the-monthy-hall-game/ The program is much more an emulator than a simulator as it performs additional steps which wouldn't be necessary for the purpose of gathering statistics. The original Monty Hall game supports three doors. This simulator supports an arbitrary number of doors, but not inferior to three. ## INSTALLATION ## No installation is required to run the simulator. Just compile and execute it. Prerequsites: cmake libboost-program-options1.46-dev Compilation instructions (from the MontyHallSimulator directory): mkdir build cd build cmake .. make Execution (from the build directory): ./montyhallsimulator ## USAGE ## ./montyhallsimulator --help Program options: --help Help message --doors arg (=3) Number of doors (default: 3) --cycles arg (=1) Number of runs of the game (default: 1) --verbose Verbose mode, prints player and host actions ## EXAMPLE ## ./montyhallsimulator --cycles 10000000 Number of games (total): 10000000 Number of times the player changed doors: 4996098 Games result (WON/TOTAL): 4996191/10000000 (49.9619%) Winning rate when changing door: 3329267/4996098 (66.6373%) Winning rate when NOT changing door: 1666924/5003902 (33.3125%)