Natural Selection Lesson 3: Differential survival and reproduction

Natural Selection Lesson 3: Differential survival and reproduction preview image

1 collaborator

Screen_shot_2018-02-02_at_12.53.50_pm lin xiang (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 156 times • Downloaded 31 times • Run 0 times
Download the 'Natural Selection Lesson 3: Differential survival and reproduction' 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

This module allows students to examine individual mice's color over time. They may also compare the survival and reproduction of mice with different colors in a specific environment.

HOW TO USE

  1. Input running time for the model
  2. Choose an environment color and number of visual predators
  3. Click "Start/Reset" to set up the model
  4. Click "Label 2 mice" and then choose two mice in the simulation.
  5. Click "Run/Pause" to run or pause the model. Use "Run a day" to run the model for a hypothetical day.

  6. The "population-color-distribution" chooser allows you to generate the same numbers of mice with each color variation (i.e., equal probability) or random numbers of mice with each color variation (i.e., random probability). This allows you to set a constant starting point when collecting data.

HOW DOES IT WORK

A population of mice live in the simulation window and are hunted by visual predators (if any). The mice's coat colors vary from dark brown (color number 31) to light brown (color number 38). Mice may reproduce when cumulating enough energy. At a 90% chance, the offspring's color will be the same as the parents'; at a 10% chance, the offspring's color will mutate to a different shade of brown.

KEEP IN MIND

The mice in the simulation are not only subject to natural selection but also compete for food resources. Therefore, individuals with a color similar to the environment may die quickly at some points due to intraspecific competition.

CREDITS AND REFERENCES

This model is created by Dr. Lin Xiang at the University of Kentucky. If you mention this model in a publication, we ask that you include the citations below.

Xiang, L. (2023). Natural Selection Lesson 3: differential survival and reproduction. Department of STEM Education, University of Kentucky, Lexington, KY.

CC BY-NC-SA 4.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

breed [mice mouse]
breed [predators predator]
turtles-own [energy labeled offspring survival-time]
patches-own [food ]
globals [n num-prey total-catches color-watched-mouse bk-color color-A color-B time-A time-B offspring-A offspring-B]

to-report Time-period
  report ticks / 60
end 

to-report mouse-A
  report mice with [label = "A" and offspring = 1]
end 

to-report mouse-B
  report mice with [label = "B" and offspring = 1]
end 

to setup
  clear-all
  setup-turtles
  setup-patches
  reset-ticks
end 

to setup-turtles

  (ifelse Population-color-distribution =  "Random probability"
    [create-mice 80
    [
    set color 31 + random 8
    set shape "mouse top"
    set size 2.75
    setxy random-xcor random-ycor
    set energy 20
    set labeled 0
    set offspring 0
    set survival-time 0
    ]]

    Population-color-distribution = "Equal probability"
      [set n  0
       repeat 8
        [create-mice 10
          [set color (item n [31 32 33 34 35 36 37 38])
          set shape "mouse top"
          set size 2.75
          setxy random-xcor random-ycor
            set energy 20
            set labeled 0
            set offspring 0
            set survival-time 0]

          set n n + 1]])
end 

to setup-patches
  ask patches [set pcolor Environment-color set food 1]
  set bk-color Environment-color
end 

to go   ; natural selection

  if Days = 0 [output-print  "Input a larger running time." stop]
  if ticks >= days [output-print  "Has reached the defined running time." stop]

  diff-survival
  move
  forage
  dead
  reproduce
  regrow
  count-survival-time
  if count mice = 0 [output-print "All mice have died."  Stop]
  tick
end 

to move
  ask mice [
            fd 1
            if random 5 = 0
    [rt (random 45) lt (random 45)]
          set energy energy - 1
  ]
end 

to dead
  ask mice [if energy <= 0 [die]]
end 

to forage
  ask mice [if food = 1  [set energy (energy + 1.3) set food 0]]
end 

to reproduce
  ask mice [
    if energy >= 40
    [if random 100 < 30 [hatch 1
      [setxy random-xcor random-ycor
        set energy 20
        set offspring 0
        set survival-time 0
        if random 100 < 15 [
          set color 31 + random 8
        ]
        if color < 31 [set color 31]
          if color > 38 [set color 38]]
      if label = "A" [set offspring-A offspring-A + 1]
      if label = "B" [set offspring-B offspring-B + 1]
      ]
      set energy energy - 20
  ] ]
end 

to regrow
  ask patches with [food = 0]  [set food 1]
end 

to diff-survival

   if bk-color != Environment-color
  [ask patches [set pcolor Environment-color]
    set bk-color Environment-color]

  ask mice [
      if random 2500 < (abs (color - Environment-color) * Number-of-visual-predators) [die]
  ]
end 

to pick-mice

  if count mice with [labeled = 1] >= 2 [output-print "Two mice have been labeled. Unlabel the mice first." stop]
  if any? mice = false [output-print "No mice here." stop]


  if mouse-inside? [
    if mouse-down? [
      let test-mouse min-one-of mice [distancexy mouse-xcor mouse-ycor]
      if test-mouse != nobody [
        ask test-mouse [(ifelse
                        count mice with [labeled = 1] = 0 and label = ""
                           [set label "A"
                            set labeled 1
                            set offspring 1
                            set color-A [color] of one-of mice with [label = "A" and offspring = 1]
                            output-print "Mouse A has been labeled."]                         ;label the 1st selected moues as "A"
                        count mice with [labeled = 1] = 1 and label = ""
                           [set label "B"
                            set labeled 1
                            set offspring 1
                            set color-B [color] of one-of mice with [label = "B" and offspring = 1]
                            output-print "Mouse B has been labeled."])                         ;label the 1st selected moues as "B"
        ]
  ]]]




  if count mice with [labeled = 1] >= 2 [stop]   ;disable the button when two mice are labelled.
end 

to count-survival-time
  if any? mouse-A
    [
     ask mouse-A
      [set survival-time survival-time + 1 set time-A  survival-time]
    ]

  if any? mouse-B
    [
     ask mouse-B
      [set survival-time survival-time + 1 set time-B survival-time]
    ]
end 

There are 5 versions of this model.

Uploaded by When Description Download
lin xiang almost 2 years ago adjust the interface Download this version
lin xiang almost 2 years ago adjust the interface Download this version
lin xiang almost 2 years ago adjust the interface Download this version
lin xiang almost 2 years ago decrease the max number of predators from 20 to 10 Download this version
lin xiang almost 2 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Natural Selection Lesson 3: Differential survival and reproduction.png preview Preview for 'Natural Selection Lesson 3: Differential survival and reproduction' almost 2 years ago, by lin xiang Download

This model does not have any ancestors.

This model does not have any descendants.