The Monty Hall Problem Simulation
The Monty Hall problem takes it’s name from a game show where the contestant has to choose from one of three doors.
Behind one door is a car, the main prize, and behind each of the other two doors is a goat.
After the contestant has chosen a door the host, Monty Hall, opens one of the other doors to reveal a goat.
The contestant is then invited to either swap his chosen door for the other unopened door or to stick with his chosen door.
The contestant actually improves his chances by swapping but this fact caused a lot of controversy
and disagreement, even among some famous mathematicians. You can read more about the problem here.
I have written a JavaScript script that simulates this game. You click on a door to select it then a goat will be revealed behind another door. You should then click on Swap or No Swap. The result is then counted according to whether you swapped or not. You can save yourself a lot of clicking by playing 1000 games at a go by selecting “1000 Plays Swap” or “1000 Plays No-Swap”. There is also a cheat function that enables you to check that the script is not cheating!
You can try it out here.
Gnome and Logitech iTouch Keyboard
Recently while messing about with xorg.conf I lost my key bindings. There is a simple way to bind the keys if you are using Gnome, simply run the following in a terminal:
gnome-keybinding-properties
A window with a list of actions and shortcuts opens. You can select the action you want and then press the key you want to associate with that action.