Misanthrope Housing Problem
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model was built to answer the following problem posed on 538:
The misanthropes are coming. Suppose there is a row of some number, N, of houses in a new, initially empty development. Misanthropes are moving into the development one at a time and selecting a house at random from those that have nobody in them and nobody living next door. They keep on coming until no acceptable houses remain. At most, one out of two houses will be occupied; at least one out of three houses will be. But what’s the expected fraction of occupied houses as the development gets larger, that is, as N goes to infinity?
http://fivethirtyeight.com/features/can-you-solve-the-puzzle-of-your-misanthropic-neighbors/
HOW IT WORKS
Available houses are colored grey. As each misanthrope chooses an available house, it is colored green, indicading the dwelling is occupied. The neighboring houses are also colored red, indicating the dwellings are no longer available.
HOW TO USE IT
To run the model, select the number of houses in a row using the "HousesInRow" slider bar. If using a single row of houses (the original problem) toggle "Grid" to off. Setting "Grid" on will simulate a grid of houses.
Then press the SETUP button followed by the GO button.
THINGS TO TRY
Try using Parameter Sweep experiments to see how changes in the size of the row impacts the expected occupancy rate.
EXTENDING THE MODEL
Get creative and change the misanthrope rules on what constitues an acceptable house. Perhaps uber-misanthropes need two empty dwellings buffering them?
Comments and Questions
to setup clear-all set-default-shape turtles "house" let i 1 if Grid = true [set i HousesInRow] set-patch-size (700 / HousesInRow) resize-world 0 (HousesInRow - 1) 0 i ;; make green atoms on left ask patches with [pycor < i ] [ sprout 1 [ set color gray ] ] reset-ticks end to go ;; asks to fill empty houses ;; move into the vacancy let i true while [ i = true ] [ tick let Misanthrope one-of turtles with [color = grey] ifelse Misanthrope = nobody [set i false ] [ask Misanthrope [ set color green ask patch-here [ask turtles-on neighbors [set color red]]]]] end
There is only one version of this model, created over 9 years ago by Robert Patchin.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Misanthrope Housing Problem.png | preview | Preview for 'Misanthrope Housing Problem' | over 9 years ago, by Robert Patchin | Download |
This model does not have any ancestors.
This model does not have any descendants.