Termites Benchmark
No preview image
Model was written in NetLogo 4.1pre9
•
Viewed 385 times
•
Downloaded 45 times
•
Run 0 times
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
globals [result] to benchmark random-seed 471 setup reset-timer ask-concurrent turtles [ repeat 350 [ go ] ] set result timer end to setup ca ask patches [ ;;randomly distributes wood chips if random 100 < density [set pcolor yellow ] ] create-ordered-turtles number ;;randomly distributes termites ask turtles [ set color white setxy random world-width random world-height ] end to go ; turtle procedure search-for-chip find-new-pile find-empty-spot end to search-for-chip ; turtle procedure -- "picks up chip" by turning orange ifelse pcolor = yellow [ set pcolor black set color orange jump 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 find-empty-spot ; turtle procedure -- "puts down chip" ifelse pcolor = black [set pcolor yellow set color white get-away] [set heading random 360 fd 1 find-empty-spot] end to get-away ; turtle procedure -- jump out of yellow piles set heading random 360 jump 20 if pcolor != black [get-away] end to wiggle ; turtle procedure fd 1 set heading heading + random 50 - random 50 end
There are 3 versions of this model.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.