Genetic Inheritance
No preview image
Model was written in NetLogo 6.1.1
•
Viewed 105 times
•
Downloaded 10 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals [ gene-list] turtles-own [genes sex] to setup ca stop-inspecting-dead-agents create-turtles 20 [ setxy random-xcor random-ycor set genes [] set sex one-of ["Male" "Female"] if sex = "Male" [set color white] if sex = "Female" [set color red] repeat 5 [ set genes lput one-of [1 2 ] genes ] ] inspect one-of turtles end to go ask turtles [ right random 90 left random 90 fd 1] ask turtles with [sex = "Male"] [ let partner one-of turtles-here with [sex = "Female"] ; males initiate when they find a female partner if partner != nobody [ let mother-genes [genes ] of partner ; the mom and dad's genes are remembered as two lists (mother-genes and father-genes) let father-genes genes hatch 1 [ ; make a baby set sex one-of ["Male" "Female"] ; randomly pick a sex for the new kid if sex = "Male" [set color blue] ; this recoloring is just so we know if they are second generation or not if sex = "Female" [set color green] set genes [] let n 0 ; a placeholder that is increased each time the gene list is created repeat length mother-genes[ ; it walks through this command block once for each gene (1st, 2nd, etc.) set gene-list [] ; possible list of inheritable genes is reset set gene-list lput item n mother-genes gene-list ; inheritable genes could either be the mom or dads set gene-list lput item n father-genes gene-list set genes lput one-of gene-list genes ; the kids genes is increased by one by randomly picking one from the gene-list set n n + 1] ; ratchets up one to look at the nth + 1 gene in the list ] ] ] while [count turtles > 20] [ ; population control ask one-of turtles [ die ] ] end
There is only one version of this model, created over 3 years ago by Andrew Calinger-Yoak.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.