Starfish_Planet_3

Starfish_Planet_3 preview image

1 collaborator

Cosimo.leuci Cosimo Leuci (Author)

Tags

adaptation 

Tagged by Cosimo Leuci over 7 years ago

biology 

Tagged by Cosimo Leuci over 7 years ago

environmental stress 

Tagged by Cosimo Leuci over 7 years ago

evolvability 

Tagged by Cosimo Leuci about 7 years ago

mutations 

Tagged by Cosimo Leuci over 7 years ago

structural-coupling 

Tagged by Cosimo Leuci over 7 years ago

Part of project 'Starfish_Planet'
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.4 • Viewed 1510 times • Downloaded 81 times • Run 0 times
Download the 'Starfish_Planet_3' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

turtles-own [

  age                     ;; an age counter for each agent/turtle/starfish

  mutator                 ;; a gene that when activated has got three alleles; the neutral one,
                          ;; the positive one (that increase the probability of mutations) and the
                          ;; the negative one (that decrease the probability of mutations)

  tolerance_variation     ;; starfishes can survive in a range of standard energy supply
                          ;; but when the switch tolerance-shift is activated, every starfish can
                          ;; diverge from the standard, as well: the magnitude of the drift is given by
                          ;; the tolerance_variation "gene"
  ]



globals [

  incoming_cosmic_energy  ;; energy coming from external space
  surface_energy          ;; energy measured on the surface of the planet
  n.red                   ;; counter of the red starfishes
  n.white                 ;; counter of the white starfishes
  rw_difference           ;; difference between red and white starfishes
  mmut                    ;; average of mutator genes activity in total population
  mvar                    ;; average of tolerance-shift variation genes in total population
  crowd?                  ;; does the number of starfishes exceed the maximum sustained by the environment?
  ]





;;  ----------   SETUP PROCEDURES   -----------------------------------------------------------------------
;;  -------------------------------------------------------------------------------------------------------

to setup

  clear-all
  reset-ticks

  set incoming_cosmic_energy 0
  set surface_energy 0

  ask patches [set pcolor cyan]        ;; the planet has a cyan background

  crt 500
    [setxy random-xcor random-ycor     ;; the planet is populated by two kinds of starfishes,
    set color red                      ;; the red ones ...
    set shape "star"
    set size 0.7
    set age random 5
    set mutator 0
    set tolerance_variation 0
    ]

  crt 500
    [setxy random-xcor random-ycor
    set color white                    ;; and the white ones
    set shape "star"
    set size 0.7
    set age random 5
    set mutator 0
    set tolerance_variation 0
    ]

  set n.red count turtles with [color = red]
  set n.white count turtles with [color = white]
  set rw_difference n.red - n.white

  set mmut 0
  set mvar 0
  set crowd? false
end 





;;  -------------- RUNTIME PROCEDURES ---------------------------------------------------------------------
;;  -------------------------------------------------------------------------------------------------------

to go

  tick

  ;; the physics of starfish planet is given by an oscillating flux of "cosmic energy"
  set incoming_cosmic_energy (cos(ticks * 31) * energy_oscillation_amplitude) + energy_average

  ;; at the surface of the planet the energetic balance is influenced by the incoming energy,
  ;; and biological factors given by the positive or negative "albedo effect"
  ;; of two different populations of starfishes
  set surface_energy
    (surface_energy + incoming_cosmic_energy) / 2 + rw_difference * albedo_parameter

  ;; the two kinds of alien starfishes populations living on the planet follow a little bit different
  ;; challenge according to their color
  ask turtles [
    if  (color = white) [white-challenge]

    if  (color = red) [red-challenge]
    ]

  ;; if the planet is overcrowded the starfishes arrive to the reproductive age later
  ;; the reproductive process is linked to the mutation chance given by the mutation_rate
  ;; after a mutation a red newborn starfish became white
  ifelse crowd? = false
    [ask turtles [if age > 2 [reproduction]]]
    [ask turtles [if age > 3 [reproduction]]]

  ;; starfishes have all the same life cycle, lasting four cosmic ticks
  ask turtles [
    set age age + 1
    if age > 4 [die]
    ]

  ;; the number of starfishes composing the two subpopulations is counted
  set n.red count turtles with [color = red]
  set n.white count turtles with [color = white]
  set rw_difference n.red - n.white

  ;; the simulation is terminated if both subpopulations are extinguished
  if (n.red + n.white = 0) [stop]

  ;; if the number of total starfishes is excessive, the system senses its state as overcrowded
  ifelse (n.white + n.red) > 1000 [set crowd? true] [set crowd? false]

  set mmut mean [mutator] of turtles
  set mvar mean [tolerance_variation] of turtles
end 

to white-challenge
  ;; the white starfishes have got a survival range included between -17 and 19 unit of cosmic energy
  if (surface_energy >= 19 + tolerance_variation) [die]
  if (surface_energy <= -17 + tolerance_variation) [die]
end 

to red-challenge
  ;; the red starfishes have got a survival range included between -19 and 17 unit of cosmic energy
  if (surface_energy >= 17 - tolerance_variation) [die]
  if (surface_energy <= -19 - tolerance_variation) [die]
end 

to reproduction
  hatch 1 [
    set age 0
    rt random-float 360
    fd 2
    if mutator-gene [if random 100 < environmental_mutation_rate + mutator
      [set mutator mutator + (random 3 - 1)]]
    set size 0.7 + tolerance_variation / 5
    if color = red [red-mutation]
    if color = white [white-mutation]
  ]
end 

to white-mutation
  ;; when tolerance-shift is ON the range of tolerance become a genetic character of starfishes
  ;; so it can change in dependence of mutation rate and it is preferentially increased
  if tolerance-shift [
    if (random 100 < environmental_mutation_rate + mutator) [
      set tolerance_variation (tolerance_variation + random 10 - 0.1)
      if tolerance_variation <= -3 [die]
      ]
    ]
  ;; even if tolerance-shift is OFF the color of newborn starfish can mutate becoming red
    if random 100 < environmental_mutation_rate + mutator [
    set color red
    ]
end 

to red-mutation
  ;; when tolerance-shift is ON the range of tolerance become a genetic character of starfishes
  ;; so it can change in dependence of mutation rate it is preferentially increased
  if tolerance-shift [
    if random 100 < environmental_mutation_rate + mutator [
      set tolerance_variation (tolerance_variation + random 10 - 0.1)
      if tolerance_variation <= -3 [die]
      ]
    ]
  ;; even if tolerance-shift is OFF the color of newborn starfish can mutate becoming white
  ;; as consequence of this the tolerance-variation is inverted, as well
  if (random 100 < environmental_mutation_rate + mutator) [
     set color white
    ]
end 

There are 18 versions of this model.

Uploaded by When Description Download
Cosimo Leuci almost 5 years ago Rev. 3.6.1 Download this version
Cosimo Leuci over 5 years ago Default values slightly varied Download this version
Cosimo Leuci over 6 years ago NetLogo 6.0.1 updated version Download this version
Cosimo Leuci almost 7 years ago A new slider (energy_average) allows you to vary the axis of energy oscillation, causing a new form of environmental stress Download this version
Cosimo Leuci about 7 years ago further adjustment of mutation_rate slider to a more effective range Download this version
Cosimo Leuci about 7 years ago Mutation rate slider was extended to very low levels (10E-8) as estimated in same biological systems (e.g. Escherichia coli) Download this version
Cosimo Leuci over 7 years ago Documentation updated Download this version
Cosimo Leuci over 7 years ago The expression of "mutator" gene was improved (the effect is retained qualitatively as before) Download this version
Cosimo Leuci over 7 years ago Info updated, interface enhanced Download this version
Cosimo Leuci over 7 years ago Some bugs were fixed and some theoretical choises were revisited. A "mutator" gene was added. Download this version
Cosimo Leuci over 7 years ago Reverted to older version Download this version
Cosimo Leuci over 7 years ago Reverted to older version Download this version
Cosimo Leuci over 7 years ago Reverted to older version Download this version
Cosimo Leuci over 7 years ago Reverted to older version Download this version
Cosimo Leuci over 7 years ago Reverted to older version Download this version
Cosimo Leuci over 7 years ago Reverted to older version Download this version
Cosimo Leuci over 7 years ago Some bugs was fixed and some theoretical choises were revisited. A "mutator" gene was added. Download this version
Cosimo Leuci over 7 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Starfish_Planet_3.png preview Preview for 'Starfish_Planet_3' over 7 years ago, by Cosimo Leuci Download

This model does not have any ancestors.

This model does not have any descendants.