This is my modified version of the original three-doors model available in the maths section of the models library. Please examine the original model too notice the differences in the running of the model due to the changes.

This page was automatically generated by NetLogo 1.1 (Rev F). Questions, problems? Contact feedback@ccl.northwestern.edu.

In order for this to work, this file, your model file (fivedoors.nlogo), and the file nLogoLite.jar must all be in the same directory. (You can copy nLogoLite.jar from the directory where you installed NetLogo.)

On some systems, you can test the applet locally on your computer before uploading it to a web server. It doesn't work on all systems, though, so if it doesn't work from your hard drive, please try uploading it to a web server.

You don't need to include everything in this file in your page. If you want, you can just take the HTML code beginning with <applet> and ending with </applet>, and paste it into any HTML file you want. It's even OK to put multiple <applet> tags on a single page.

If nLogoLite.jar and your model are in different directories, you must modify the archive= and value= lines in the HTML code to point to their actual locations. (For example, if you have multiple applets in different directories on the same web server, you may want to put a single copy of nLogoLite.jar in one central place and change the archive= lines of all the HTML files to point to that one central copy. This will save disk space for you and download time for your user.)

In this second model I have modified the program so that now the host also does not know whats behind each door. With this increased randomness, the model seems to lose its bias towards the turtles make switches frequently.

created with NetLogo

view/download model file: fivedoors.nlogo

WHAT IS IT?
-----------
You are a contestant on a game show. You, of all people, have made it to the final round, where you have the chance to win some fabulous prize -- a car, a million dollars, eternal youth, etc... The host or hostess of the game show takes you up on stage, where you stand before three doors, marked "0", "1", and "2".

"Your prize is behind one of these three doors. Behind the other two are goats, and you don't want these goats. So, which one will you pick?" she or he says. You make your selection, and reach for the door -- but before you open it, the hostess or host says to you: "All right, now I'm going to give you a choice." She or he opens another one of the doors, one you didn't pick. And sure enough, there's an ugly old goat.

The hostess or host then points to the other door, saying: "If you want, you can change your mind, and pick the last door; the door you didn't pick that I didn't open. So now, which will it be? Your first selection? Or the other door?" You think for a brief moment...

Which will it be? Will you stick with your first choice, or switch to the other door? Does it matter? Do you have better odds of winning the prize by switching or sticking? Or is it even odds either way? (We're assuming here that you want the prize and have an aversion to goats. If you really would prefer the goat, then the prize is the goat, and the two other doors are empty, or contain mulch, whatever...)

This is a classic puzzle in thinking about probability. It has several other names: the 'Monty Hall' puzzle (named after the host of the game show this is taken from: "Let's Make a Deal") and 'Goats-and-Car' being the two most common. The puzzle is based around the questions being asked above, which really boil down to one question at the heart of the matter: which is it better to do, stick or switch?

This project is called Three Doors. Essentially what goes on is this: an arbitrary number of turtles (around several hundred, usually) gather together at the bottom of the screen. They then begin to play this three-doors game over and over again. The prize they can win is a turtle-command: 'fd 1'. If they lose, nothing happens. Thus, the turtles are having a race to the top of the screen, and they can only advance in the race if they win a prize.

Turtles determine the results of each round of the contest by themselves, alternately acting as contestant and host or hostess. Also, each turtle has a 'hunch' - a percentage chance that it will switch to the other door. The value of 'hunch' determines a turtle's color. A turtle that always sticks with its original choice of doors has a hunch of 0 and is colored black. A turtle that always switches its choice of doors has a hunch of 100 and is colored white.


HOW THIS MODEL HAS BEEN EXTENDED
---------------------------------

Originally the model had only 3 doors. I wondered if this was a limitation and if the
system would respond differenly if the number of options was increased. This proved to
be tougher than I originally thought it would because the system was designed to handle
only 3 doors. I thought I would include a slider so that the user could decide how many doors to use but I realised that this did not help understand the model in any particular way and was only adding to the complexity of the code so i decided to keep the number of doors constant at 5. This addition of 2 more doors to the original model is sufficient to observe the changes that occur.

I had guessed that if i added more doors, this would cancel the effect of helping the turtles that choise to swith doors and so they would not win everytime. But when I implented the changes I was surprised to see that the very opposite of this happened. The turtles which chose to switch reached the finish line even faster than they did initially. This model really interested me and I am still trying to understand why it does what it does.