Pocket Mouse

Pocket Mouse 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.0 • Viewed 480 times • Downloaded 47 times • Run 0 times
Download the 'Pocket Mouse' modelDownload this modelEmbed this model

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


MODEL IDEAS

This module provides students with opportunities to identify and test different components of natural selection model.

CREDITS AND REFERENCES

This module is made by Dr. Lin Xiang at Weber State University. If you mention this model in a publication, we ask that you include the citations below.

Xiang, L. (2017). Pocket Mouse Module. Zoology Department, Weber State University, Ogden, UT.

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

turtles-own [energy]

to-report Time-period
  report ticks / 40
end 

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

to setup-turtles
  create-turtles Starting-population-size
  ask turtles [
    set color 37.7 - random-float (Mutation-rate / 2)
    set shape "mouse side"
    set size 1.25
    setxy random-xcor random-ycor
    set energy 20]
end 

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

to go

  if years = 0 [user-message "Number of years is needed" stop]
  if ticks > years * 40 [stop]


  if color-heritable? = false [ask turtles [set color 31 + random-float 7.5]]
  diff-survival
  move
  forage
  dead
  reproduce
  regrow
  if count turtles = 0 [user-message "All mice have died."  Stop]
  tick
end 

to move
  ask turtles [rt (random 180)
               fd 1
               set energy energy - 1]
end 

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

to forage
  ask turtles [if pcolor = Environment-color [set energy (energy + 1.5) set pcolor pcolor - 1]]
end 

to reproduce
  ask turtles [
    if energy >= 40
    [hatch 1
      [set energy 20
       if random 100 < Mutation-rate [
          ;set color (color - 1) + random-float 2
          set color 31 + random-float 7.5
        ]
        if color < 31 [set color 31]
        if color > 38.5 [set color 38.5]]
      set energy energy - 20
      ] ]
end 

to regrow
  ask patches with [pcolor != Environment-color] [set pcolor Environment-color]
end 

to diff-survival
    ask turtles [
      if random 2500 < (abs (color - Environment-color) * Number-of-visual-predators * 0.5) [die]
    ]
end 

There are 9 versions of this model.

Uploaded by When Description Download
lin xiang over 3 years ago Adjust the parameters Download this version
lin xiang over 4 years ago add population control Download this version
lin xiang over 4 years ago Adjust X axis Download this version
lin xiang over 4 years ago Add in standard deviation Download this version
lin xiang over 4 years ago Adjust the slider length Download this version
lin xiang over 4 years ago adjust the selection pressure and add plots Download this version
lin xiang almost 5 years ago users may determine the time Download this version
lin xiang about 5 years ago update interface Download this version
lin xiang over 7 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Pocket Mouse.png preview Preview for 'Pocket Mouse' over 7 years ago, by lin xiang Download

This model does not have any ancestors.

This model does not have any descendants.