Sugarscape Sexual Reproduction
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model in the NetLogo Sugarscape suite implements Epstein & Axtell's Sugarscape Sexual reproduction, as described in chapter 3 of their book Growing Artificial Societies: Social Science from the Bottom Up. It simulates a population with limited, spatially-distributed resources available and 2 differents sex distrbuted among population. In order to can reproduce each turtle must be from different sex and have enough amount of sugar and their age must be in the range of fertility variable.
HOW IT WORKS
The rules are similar to Sugarscape constant grow, in adition each individual has a defined sex, that could be female or male. If an individual finds another turtle from different sex and in a reproductive age and with enough amount of sugar and the turtle is near the caller and there is an empty patch near them, then thay can offspring. Vision and metabolism are passed through generations by random chance or the vision from one parent or the metabolism from the other.
HOW TO USE IT
Set the INITIAL-POPULATION slider before pressing SETUP. This determines the number of agents in the world.
Press SETUP to populate the world with agents and sugar. GO will run the simulation continuously, while GO ONCE will run one tick.
The four plots show the world population over time, the distribution of sugar among the agents, the mean vision of all surviving agents over time, and the mean metabolism of all surviving agents over time.
The two monitors show the amount of turtles belonging to each sex.
THINGS TO NOTICE
The world has a carrying capacity, which is lower than the initial population of the world. Agents who are born in sugarless places or who consume more sugar than the land cannot be supported by the world, and die. Other agents die from competition - although some places in the world have enough sugar to support them, the sugar supply is limited and other agents may reach and consume it first.
As the population stabilizes, the average vision increases while the average metabolism decreases. Agents with lower vision cannot find the better sugar patches, while agents with high metabolism cannot support themselves. The death of these agents causes the attribute averages to change.
You can watch different demographic regimes going through time; inheritance follows mendelian rules.
THINGS TO TRY
Population grows and shrinks until reach some kind of stable state. You can try with different initial populations and test some hypothesis about the influence of this initial state in the final state.
EXTENDING THE MODEL
As mentiones by Axtell & Epstein you can change the way of agent reproduction and avoid reproduction among members of the same family or you can change the sugar inheritance rule once one of the parents die (in current implementation that amount of sugar is vanished from the board).
NETLOGO FEATURES
We use here the matrix extension to build the sugar world.
RELATED MODELS
Other models in the NetLogo Sugarscape suite include:
- Sugarscape 1 Immediate Growback
- Sugarscape 3 Wealth Distribution
- Sugarscape 4 Seasonal Migration
- Sugarscape 5 Cultural Dynamics
- Sugarscape 6 Sexual Reproduction
CREDITS AND REFERENCES
Epstein, J. and Axtell, R. (1996). Growing Artificial Societies: Social Science from the Bottom Up. Washington, D.C.: Brookings Institution Press.
HOW TO CITE
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
- Diaz Cordova, D, (2023). Netlogo Sugarscape 6. Sexual Reproduction. Universidad Nacional de Lanús. Argentina.
Please cite the NetLogo software as:
- Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
COPYRIGHT AND LICENSE
Copyright 2009 Uri Wilensky.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.
Comments and Questions
extensions [matrix] turtles-own [ sugar ;; the amount of sugar this turtle has metabolism ;; the amount of sugar that each turtles loses each tick vision ;; the distance that this turtle can see in the horizontal and vertical directions vision-points ;; the points that this turtle can see in relative to it's current position (based on vision) ;culture ;; a list containing cultural tags ;culturecolor ;; sum of culture list tags sexo ;; set agent sex 1 male 0 female edad ;; set agent age muerte ;; set agent age death fertilidadc ;; set agent age fertility start fertilidadf ;; set agent age fertility end dotacion ;; set agent sugar amount at birth (or creation in the setup routine) ] patches-own [ psugar ;; the amount of sugar on this patch max-psugar ;; the maximum amount of sugar that can be on this patch ] ;; ;; Setup Procedures ;; to setup clear-all create-turtles initial-population [ turtle-setup ] setup-patches reset-ticks end to turtle-setup ;; turtle procedure set color red set shape "person" move-to one-of patches with [not any? other turtles-here] set sugar random-in-range 50 100 ;;guardo la dotacion inicial de azucar set dotacion sugar set metabolism random-in-range 1 4 set vision random-in-range 1 6 ;; turtles can look horizontally and vertically up to vision patches ;; but cannot look diagonally at all set vision-points [] foreach (range 1 (vision + 1)) [ n -> set vision-points sentence vision-points (list (list 0 n) (list n 0) (list 0 (- n)) (list (- n) 0)) ] ;set culture n-values 11 [random 2] ; edad de muerte set muerte 60 + random 40 ; sexo if 1 = male, 0 = female set sexo random 2 set edad 0 set fertilidadc 12 + random 3 ifelse sexo = 1 [set fertilidadf 50 + random 10] [set fertilidadf 40 + random 10] run visualization end to setup-patches let m matrix:from-row-list [[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 2 2 2 2 2 2 2 2] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 2] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 2] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 3 3 3 3 3 3 3 2 2] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 4 3 3 3 3 3 3 2] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 4 4 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 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]] let i 0 let j 0 ;let m1 matrix:transpose m ;; let row-i matrix:get-row m i ask patches with [pxcor = i and pycor = j] ;[set max-psugar item rowx row-i let rowx 49 repeat 50 [ repeat 50 [let row-i matrix:get-row m i ask patches with [pxcor = i and pycor = j] [set max-psugar item rowx row-i ;ask patches with [pxcor = i and pycor = j] [set max-psugar item rowx (matrix:get-row m i) set psugar max-psugar patch-recolor ] set rowx rowx - 1 set j j + 1 ] set i i + 1 set j 0 set rowx 49] end ;; ;; Runtime Procedures ;; to go if not any? turtles [ stop ] ask patches [ patch-growback patch-recolor ] ask turtles [ ;turtle-culture turtle-move turtle-eat if sugar <= 0 [ die ] if edad = muerte [die] set edad edad + 1 if (edad >= fertilidadc) and (edad <= fertilidadf) and (sugar >= dotacion) [sexear] run visualization ] tick end to parir [metaP visionP metaM visionM dotacionP dotacionM] hatch 1 [ move-to patch-ahead 1 set color green ifelse (random 2 = 0) [set metabolism metaM] [set metabolism metaP] ifelse (random 2 = 0) [set vision visionM] [set vision visionP] set vision-points [] foreach (range 1 (vision + 1)) [ n -> set vision-points sentence vision-points (list (list 0 n) (list n 0) (list 0 (- n)) (list (- n) 0)) ] ifelse (random 2 = 0) [set sexo 0] [set sexo 1] set muerte 60 + random 40 set edad 0 set fertilidadc 12 + random 3 ifelse sexo = 1 [set fertilidadf 50 + random 10] [set fertilidadf 40 + random 10] let sugarH (dotacionP / 2) + (dotacionM / 2) set sugar sugarH set dotacion sugar ] end to sexear let sexoc sexo let metaP metabolism let visionP vision let bnacio false let dotacionP dotacion let bvacio false let metaM 0 let visionM 0 let dotacionM 0 let vecindario turtles-on neighbors4 if (count(vecindario) > 0) [ask vecindario [ set metaM metabolism set visionM vision set dotacionM dotacion repeat 4 [ if (sexoc != sexo) and (edad >= fertilidadc) and (edad <= fertilidadf) and (sugar >= dotacion) and (not any? turtles-on patch-ahead 1) [ parir metaP visionP metaM visionM dotacionP dotacionM set sugar sugar - (dotacionM / 2) set bNacio true ] set heading heading + 90 ] ;si la pareja no tiene lugar fijarse si hay lugar en el llamador if (sexoc != sexo) and (edad >= fertilidadc) and (edad <= fertilidadf) and (sugar >= dotacion) and (bNacio = false) [set bvacio true ] ] if bvacio = true [repeat 4 [if (not any? turtles-on patch-ahead 1) [parir metaP visionP metaM visionM dotacionP dotacionM set bNacio true ] set heading heading + 90 ] ] ] if bNacio = true [set sugar sugar - (dotacionP / 2)] end ;to turtle-culture ; let vecindario turtles-on neighbors4 ; ;; me fijo si hay alguna tortuga en su vecindario ; if (count(vecindario) > 0) ; [;; selecciono un tag cultural al azar ; let rndvalue random 11 ; let culturetag item rndvalue culture ; ask vecindario [let culturetagV item rndvalue culture ; if culturetag != culturetagV ; [set culture replace-item rndvalue culture culturetag] ; ] ; ] ;end to turtle-move ;; turtle procedure ;; consider moving to unoccupied patches in our vision, as well as staying at the current patch let move-candidates (patch-set patch-here (patches at-points vision-points) with [not any? turtles-here]) let possible-winners move-candidates with-max [psugar] if any? possible-winners [ ;; if there are any such patches move to one of the patches that is closest move-to min-one-of possible-winners [distance myself] ] end to turtle-eat ;; turtle procedure ;; metabolize some sugar, and eat all the sugar on the current patch set sugar (sugar - metabolism + psugar) set psugar 0 end to patch-recolor ;; patch procedure ;; color patches based on the amount of sugar they have set pcolor (yellow + 4.9 - psugar) end to patch-growback ;; patch procedure ;; gradually grow back all of the sugar for the patch ;set psugar min (list max-psugar (psugar + 1)) ;set psugar max-psugar if psugar < max-psugar [set psugar psugar + 1] end ;; ;; Utilities ;; to-report random-in-range [low high] report low + random (high - low + 1) end ;; ;; Visualization Procedures ;; to no-visualization ;; turtle procedure set color red end to color-agents-by-vision ;; turtle procedure set color red - (vision - 3.5) end to color-agents-by-metabolism ;; turtle procedure set color red + (metabolism - 2.5) end to color-agents-by-culture set color red ; set culturecolor reduce + culture ; ifelse culturecolor > 5 ; [set color red] ; [set color blue] ; ;[set color scale-color red culturecolor 0 10 ] ; ;[set color scale-color blue culturecolor 0 10] end ; Copyright 2009 Uri Wilensky. ; See Info tab for full copyright and license.
There is only one version of this model, created over 2 years ago by Diego Díaz Córdova.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Sugarscape Sexual Reproduction.png | preview | Preview for 'Sugarscape Sexual Reproduction' | over 2 years ago, by Diego Díaz Córdova | Download |
This model does not have any ancestors.
This model does not have any descendants.