Termites (Perspective Demo)

Termites (Perspective Demo) preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

biology 

Tagged by Reuven M. Lerner over 11 years ago

Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 407 times • Downloaded 62 times • Run 0 times
Download the 'Termites (Perspective Demo)' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

to setup
  clear-all
  set-default-shape turtles "bug"
  ;; randomly distribute wood chips
  ask patches
  [ if random-float 100 < density
      [ set pcolor yellow ] ]
  ;; randomly distribute termites
  create-turtles number [
    set color white
    setxy random-xcor random-ycor
    set size 5  ;; easier to see
  ]
end 

to go ;; turtle procedure
  search-for-chip
  find-new-pile
  put-down-chip
end 

to search-for-chip ; turtle procedure -- "picks up chip" by turning orange
  ifelse pcolor = yellow
    [ set pcolor black
      set color orange
      fd 20 ]
    [ wiggle
      search-for-chip ]
end 

to find-new-pile ; turtle procedure -- look for yellow patches
  if pcolor != yellow
  [ wiggle
    find-new-pile ]
end 

to put-down-chip ; turtle procedure -- finds empty spot & drops chip
  ifelse pcolor = black
  [ set pcolor yellow
    set color white
    get-away ]
  [ rt random 360
    fd 1
    put-down-chip ]
end 

to get-away ; turtle procedure -- escape from yello piles
  rt random 360
  fd 20
  if pcolor != black
    [ get-away ]
end 

to wiggle ; turtle procedure
  fd 1
  rt random 50
  lt random 50
end 


; Copyright 1997 Uri Wilensky.
; See Info tab for full copyright and license.

There are 6 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky about 12 years ago Updated version tag Download this version
Uri Wilensky almost 13 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky over 14 years ago Termites (Perspective Demo) Download this version

Attached files

File Type Description Last updated
Termites (Perspective Demo).png preview Preview for 'Termites (Perspective Demo)' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.