MIHS Sample for Inheritance and Tendency
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
smaples of how to create heritable variation and to use a slider to set a "tendency" for behavior.
HOW IT WORKS
inheritance: uses "hatch" and "
HOW TO USE IT
Click 'setup' to create some kings. Click 'go' to get one random king to "hatch" an offspring that will tend to be either bigger or smaller, depending on the value of "size-preference". Every time you click 'go', one more king will hatch. Use the "size-preference" slider to change the tendency for the kings to grow larger or smaller.
THINGS TO NOTICE
Kings inherit the size of their parent, plus or minus a random amount. Changing the "size-preference" slider makes it more likely for kings to get bigger or smaller.
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
to setup ;; create 10 gray kings of size 5 clear-all ask patches [set pcolor white] create-turtles 10 [set shape "chess king" set size 5 set color gray fd random 5] end to go ;; hatch a new king that inherits its parent's size, plus or minus a random amount if size-preference < 0 ;; new kings will be smaller than parent [ask one-of turtles [hatch 1 [set size [size] of myself + random (size-preference - 1) set color random 390 fd random 3 + 1]]] if size-preference = 0 ;; new kings will be the same size as parent [ask one-of turtles [hatch 1 [set size [size] of myself set color random 390 fd random 3 + 1]]] if size-preference > 0 ;; new kings will be larger than parent [ask one-of turtles [hatch 1 [set size [size] of myself + random (size-preference + 1) set color random 390 fd random 3 + 1]]] end
There is only one version of this model, created over 8 years ago by Larry Bencivengo.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
MIHS Sample for Inheritance and Tendency.png | preview | Preview for 'MIHS Sample for Inheritance and Tendency' | over 8 years ago, by Larry Bencivengo | Download |
This model does not have any ancestors.
This model does not have any descendants.