Genetic Inheritance

No preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 223 times • Downloaded 24 times • Run 0 times
Download the 'Genetic Inheritance' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

(a general understanding of what the model is trying to show or explain)

HOW IT WORKS

(what rules the agents use to create the overall behavior of the model)

HOW TO USE IT

(how to use the model, including a description of each of the items in the Interface tab)

THINGS TO NOTICE

(suggested things for the user to notice while running the model)

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

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 about 5 years ago by Andrew Calinger-Yoak.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.