Isopod Box Simple

Isopod Box Simple preview image

1 collaborator

Default-person ERIK SCULLY (Author)

Tags

animal behavior 

Tagged by ERIK SCULLY about 8 years ago

biology 

Tagged by ERIK SCULLY about 8 years ago

habitat preference9 

Tagged by ERIK SCULLY about 8 years ago

habitat preferenceP 

Tagged by ERIK SCULLY about 8 years ago

habitat preferenceb 

Tagged by ERIK SCULLY about 8 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.1 • Viewed 788 times • Downloaded 47 times • Run 0 times
Download the 'Isopod Box Simple' 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?

Terrestrial isopods (sometimes called pillbugs or woodlice) are actually crustaceans that can complete their entire life cycle on land. However, their evolutionary history means that they share characteristics of their crustacean ancestors that constrain them to living in, typically, damp soil, leaf litter, or under rocks.

This model is inspired by an actual classroom exercise in which students test for behavioral preferences in isopods. The students then discuss and analyze the results. The isopods are placed in plastic storage boxes that have been subdivided into four substrates: sand (a novel substrate because the isopods are raised on soil), soil, sand with a piece of bark (potential shelter), and soil with a piece of bark. The isopods are released into the center of the box, and their locations are recorded as the number in each section after at least two hours.

HOW IT WORKS

During Setup, the isopods are placed randomly around the box. While actual isopods are grey to brown, the default agent colors of NetLogo have been used to make it easier to follow individuals.

All isopods have the same substrate preference that is preset at the Setup phase of the model. The isopods will move until they reach a patch that is their preferred substrate.

Experience with several isopod species has shown that they have different rates of movement. This is included in the model by allowing the user to preset the probability of movement. Isopods move if a uniform random variable is less than or equal to the probability of movement. Part of the movement procedure includes code that changes the heading of an isopod if it runs into a side of the box.

The number of isopods in each section is plotted as a histogram during the course of the simulation. The red horizontal line in the plot is meant to indicate the expected number of isopods if they were distributed uniformly among the four sections (e.g., the expected value for a chi-squared analysis).

The simulation ends when all isopods have reached their preferred substrate.

HOW TO USE IT

The first step would be to set up the isopod box. Each of the four sections can be set to any of the four substrates. You can make all of the sections the same, or have the four different substrates in any particular order. Sand is indicated by a brown color, soil is gray, and bark is indicated as rectangles of lighter shades of brown.

The next step would be to determine how many isopods you would like to have. The current limit is 100. You can also set their movement probability (if not on their preferred substrate), and their preferred substrate.

The final steps are to press the setup button and then the go button. The model runs until the last isopod has reached its preferred substrate. The View Updates option is set to update on each "tick" this offers a better view of individual movements. Choosing continuous updates offers a rapid conclusion.

THINGS TO NOTICE

The plot to the right of the box shows then number of isopods in each section as the program runs. If the isopods had no preference, and simply moved randomly, we would expect approximately an equal number of isopods in each section, as indicated by the red horizontal line. Notice how the plot changes as the model progresses.

THINGS TO TRY

You can set up the box with any combination of the available substrates. One performance output is the number of “ticks” until the last isopod has found its preferred substrate. How does this change with the location of the preferred substrate, the number of sections with the preferred substrate, the number of isopods, and their movement probability?

EXTENDING THE MODEL

As part of an actual classroom exercise: If you have an isopod box setup similar to the model, you can compare your actual results to the simulation. You could also use your actual observations to estimate movement probability and habitat preference.

This model is called the Simple version because the only factor is habitat preference. If you are comparing it to a real world case, students could discuss what other factors might affect isopod movements and preference.

For NetLogo programmers:

  • Make shelter and substrate independent, or make shelter the preference rather than combining it with substrate.

  • Alter the probability of movement by making it dependent on the patch type: have isopods less likely to move (not stop moving) if they are on their preferred substrate.

  • Some species of isopods have a tendency to form aggregations (see references below), but there may be an optimum group size. Alter the probability of movement based on the number of neighboring isopods.

  • A common statistical analysis for a situation like this would be a chi-squared test. Add a real time calculation of the chi-squared statistic. At what point does it pass the critical value (based on 3 degrees of freedom) for statistical significance?

  • It was a deliberate decision to use the default NetLogo colors for the isopods. However, they are usually gray to dark brown. The model could be changed to give them a more realistic range of colors.

NETLOGO FEATURES

The model did not call for any novel workarounds, but it does take advantage of a number of NetLogo features:

  • Random number generators for isopod placement and movement.
  • Ability to specify patch position and color.
  • Ability to use patch color as an indicator of patch properties.

RELATED MODELS

There are a number of NetLogo models that deal with an aspect of agent movements. Some examples found in the NetLogo Models Library include: Ant Lines; Ants; BeeSmart Hive Finding; Flocking; Slime

CREDITS AND REFERENCES

The initial version of this model was developed as part of the online course Introduction to Agent Based Modeling (Summer 2017), taught by Dr. William Rand (North Carolina State University) and offered through the Santa Fe Institute.

References:

Brockett, B. F. T., and M. Hassall. 2005. The existence of an Allee effect in populations of Porcellio scaber (Isopoda: Oniscidea). European Journal of Soil Biology, 41:123-127.

Hassall, Mark, Edwards, David P., Carmenta, Rachel, Derhé, Mia A., Moss, Anna. 2010. Predicting the effect of climate change on aggregation behaviour in four species of terrestrial isopods. Behaviour, 147(2):151-164.

Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

Wilensky, U., and W. Rand, 2015. An Introduction to Agent-based Modeling. MIT Press, Cambridge MA.

Comments and Questions

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

Click to Run Model

globals
[
  sand
  soil
  sand-bark
  soil-bark
  preferred
]

to setup
  clear-all
  ;; set colors for substrate and shelter and set sections based on user choices
  ;; set colors for the substrate options
  set sand brown
  set soil gray
  set sand-bark brown + 2
  set soil-bark brown + 3

  ;; next two lines set up section 1 for either sand or soil for section 1
  if section-1 = "sand" [ ask patches with [pxcor >= 0 and pycor >= 31] [ set pcolor sand ]]
  if section-1 = "soil" [ ask patches with [pxcor >= 0 and pycor >= 31] [ set pcolor soil ]]
  ;; next lines set up section-1 for sand + bark
  if section-1 = "sand-bark" [ ask patches with [pxcor >= 0 and pycor >= 31] [ set pcolor sand ]]
  if section-1 = "sand-bark" [ ask patches with [ pxcor >= 11 and pxcor <= 20  and pycor >= 33 and pycor <= 38  ][set pcolor sand-bark]]
  ;; next lines set up section-1 for the soil + bark choice
  if section-1 = "soil-bark" [ ask patches with [pxcor >= 0 and pycor >= 31] [ set pcolor soil ]]
  if section-1 = "soil-bark" [ ask patches with [ pxcor >= 11 and pxcor <= 20  and pycor >= 33 and pycor <= 38  ][set pcolor soil-bark]]

  ;; the next lines set up the sand or soil choices for section 2
  if section-2 = "sand" [ask patches with [pxcor >= 0 and pycor >= 21 and pycor <= 30 ] [ set pcolor sand ]]
  if section-2 = "soil" [ask patches with [pxcor >= 0 and pycor >= 21 and pycor <= 30 ] [ set pcolor soil ]]
  ;; set sand-bark choices for section 2
  if section-2 = "sand-bark" [ask patches with [pxcor >= 0 and pycor >= 21 and pycor <= 30 ] [ set pcolor sand ]]
  if section-2 = "sand-bark" [ ask patches with [ pxcor >= 11 and pxcor <= 20  and pycor >= 23 and pycor <= 28  ][set pcolor sand-bark]]
  ;; set soil-bark choice for section 2
  if section-2 = "soil-bark" [ask patches with [pxcor >= 0 and pycor >= 21 and pycor <= 30 ] [ set pcolor soil ]]
  if section-2 = "soil-bark" [ ask patches with [ pxcor >= 11 and pxcor <= 20  and pycor >= 23 and pycor <= 28  ][set pcolor soil-bark]]

  ;; set conditions for section 3
  if section-3 = "sand" [ask patches with [pxcor >= 0 and pycor >= 11 and pycor <= 20 ] [ set pcolor sand ]]
  if section-3 = "soil" [ask patches with [pxcor >= 0 and pycor >= 11 and pycor <= 20 ] [ set pcolor soil ]]
  ;; set sand-bark choices for section 3
  if section-3 = "sand-bark" [ask patches with [pxcor >= 0 and pycor >= 11 and pycor <= 20 ] [ set pcolor sand ]]
  if section-3 = "sand-bark" [ ask patches with [ pxcor >= 11 and pxcor <= 20  and pycor >= 13 and pycor <= 18  ][set pcolor sand-bark]]
  ;; set soil-bark choice for section 3
  if section-3 = "soil-bark" [ask patches with [pxcor >= 0 and pycor >= 11 and pycor <= 20 ] [ set pcolor soil ]]
  if section-3 = "soil-bark" [ ask patches with [ pxcor >= 11 and pxcor <= 20  and pycor >= 13 and pycor <= 18  ][set pcolor soil-bark]]

  ;; set conditions for section 4
  if section-4 = "sand" [ask patches with [pxcor >= 0 and pycor >= 0 and pycor <= 10] [ set pcolor sand ]]
  if section-4 = "soil" [ask patches with [pxcor >= 0 and pycor >= 0 and pycor <= 10] [ set pcolor soil ]]
  ;; set sand-bark choices for section 4
  if section-4 = "sand-bark" [ask patches with [pxcor >= 0 and  pycor <= 10] [ set pcolor sand ]]
  if section-4 = "sand-bark" [ask patches with [ pxcor >= 11 and pxcor <= 20 and pycor >= 3 and pycor <= 8  ][set pcolor sand-bark]]
  ;; set soil-bark choice for section 3
  if section-4 = "soil-bark" [ask patches with [pxcor >= 0 and pycor <= 10] [ set pcolor soil ]]
  if section-4 = "soil-bark" [ ask patches with [ pxcor >= 11 and pxcor <= 20  and pycor >= 3 and pycor <= 8  ][set pcolor soil-bark]]

;; set preference (preferred) based on user choices
  if prefer = "sand" [ set preferred sand ]
  if prefer = "soil" [ set preferred soil ]
  if prefer = "sand+bark" [ set preferred sand-bark ]
  if prefer = "soil+bark" [ set preferred soil-bark ]

;; generate isopods
 crt isopods [
    setxy random-xcor random-ycor
    set shape "bug"
  ]
      reset-ticks
end 

to go
  ;; determine probability of isopod movement based on movement probability
  if  random-float 1 <= movement-probability [ask turtles with [ [pcolor] of patch-here != preferred ] [ move ]]
  ;; stop simulation if all isopods have reached their preferred substrate
  if not any? turtles with [[ pcolor ] of patch-here != preferred ] [ stop ]
  tick
end 

;; basic isopod movement.  movement is random and they change heading if they encounter a wall

to move
;; changw heading if you run into a wall
  if pxcor = max-pxcor
    [ set heading (  - heading) ]
  if pxcor = min-pxcor
  [ set heading ( - heading ) ]
  if pycor = max-pycor
    [ set heading ( 180 - heading) ]
  if pycor = min-pycor
  [set heading ( 180 - heading ) ]

;; move randomly
  rt random 5
  lt random 5
  fd 5
end 

There is only one version of this model, created about 8 years ago by ERIK SCULLY.

Attached files

File Type Description Last updated
Isopod Box Simple.png preview Preview for 'Isopod Box Simple' about 8 years ago, by ERIK SCULLY Download

This model does not have any ancestors.

This model does not have any descendants.