TermitesLog preview image

This model is seeking new collaborators — would you please help?

1 collaborator

I-patarakin Evgeny Patarakin (Author)



Tagged by Evgeny Patarakin over 1 year ago

Parent of 1 model: Child of TermitesLog
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.2.0 • Viewed 365 times • Downloaded 17 times • Run 0 times
Download the 'TermitesLog' modelDownload this modelEmbed this model

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


This project is inspired by model one of termites gathering wood chips into piles.

На этот проект проект меня вдохновила очень давняя модель термитника.

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

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

The original Termites project is inspired by the behavior of termites gathering wood chips into piles. The termites follow a set of simple rules. Each termite starts wandering randomly. If it bumps into a wood chip, it picks the chip up, and continues to wander randomly. When it bumps into another wood chip, it finds a nearby empty space and puts its wood chip down. With these simple rules, the wood chips eventually end up in a single pile.

Each turtle performs a sequence of steps in procedures search-for-chip find-new-pile put-down-chip which leads to the result when chips scattered randomly over the screen are gradually gathered into one round pile. Termites model seems most optimal because it contains chips as objects for collaboration. Experimenting on this model we can get a deeper understanding of collaboration phenomenon. Let’s imagine that termites record their labour actions over chips in a log. I.e. if an actor performs a meaningful action on a chip, he leaves a record on this in the log. To understand how we can benefit from collateral records we have modified the original text of Termites model by adding new variables and rules. We have inserted a variable called list WIKILOG where turtles make records of their actions. There also have been made some additions to the procedures search-for-chip and put-down-chip

This simplest model for sociograms creation based on the actions with social objects can be applied to various collaboration situations. In all cases when actors perform actions over shareable objects, the log for these actions can help build sociograms as well as conduct social research. This statement was used when we designed a learning social network Letopisi.org, which combines cycles of creative and research learning.


Click the SETUP button to set up the termites (white) and wood chips (yellow). Click the GO button to start the simulation. The termites turn orange when they are carrying a wood chip.

The NUMBER slider controls the number of termites. (Note: Changes in the NUMBER slider do not take effect until the next setup.) The DENSITY slider controls the initial density of wood chips.

The Number_of_turns slider controls the number of turns.

### Logs_to_sociogram button

Logs_to_sociogram button switches all the chips off the screen and only shows linkage between agents carrying one and the same chip.


Чем меньше щепок, тем быстрее образуются связи между участниками





* NetLogo Termites model



Comments and Questions

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

Click to Run Model

extensions [nw csv]

patches-own [pagenum]
turtles-own [t-pagenum]

directed-link-breed [friendbonds friendbond] ;

globals [
  wikilog ; log, куда записываются 
  pages ;; перечень созданных страниц

to setup
  set wikilog []
  set pages []
  set-default-shape turtles "bug"
;;    set-default-shape turtles "person"
  ;; randomly distribute wood chips
  ask patches
     set pagenum 0  ;; это метка для пятна, что здесь нет палочки
     ;; А нужно ли иметь этот 0 в каждой точке 
    if random-float 100 < density
    [ set pcolor yellow ] ]
  ;; randomly distribute termites
  create-turtles number [
    set color white
    setxy random-xcor random-ycor
    set size 3  ;; easier to see

to go  ;; turtle procedure
  if length wikilog > number_of_turns [stop] ;; ограничитель числа ходов

to search-for-chip  ;; turtle procedure -- "picks up chip" by turning orange
  ifelse pcolor = yellow [ 
    ;; Если это палочка, которую не брали, то надо записать в журнал, что я создал эту новую палочку
     ifelse 0 = [pagenum] of patch-here [
       let newpage 1 + length pages set pages lput newpage pages 
       set t-pagenum newpage ;; это номер палочки, которую создал
            set wikilog lput (se [who] of self newpage "create" ) wikilog 
     [set t-pagenum [pagenum] of patch-here ;; а если палочка, которую уже кто-то создал, то я записал себе номер этой палочки
    set pcolor black  set color orange  fd 20 ] ;; взял палочку, и с этой палочкой пошел
  ; если я стоял на палочке, то я взял палочку. 
  ; И, если такой палочки еще не было, то я присвоил палочке номер - по сути дела, я создал палочку 
  ; А что я могу записать об этом?
  ;; Мое имя + Имя_Объекта + Действие - я его взял на редакцию 
  [ wiggle     search-for-chip ]  ;; а если ты не нашел, то продолжай поиск

to find-new-pile  ;; turtle procedure -- look for yellow patches
  ;; это он ищет новую палочку, как только найдет - остановится и запустится put-down-chip
  if pcolor != yellow
  [ wiggle find-new-pile ]

to put-down-chip  ;; turtle procedure -- finds empty spot & drops chip
  ;;; смотри - вот я нашел место, где могу положить палочку - я сюда положил палочку и ушел. 
  ;; И записал в журнале, что я палочку положил
  ifelse pcolor = black   ;; в первой проверке это не так, потому что я только что нашел новую палочку, я теперь покручусь вокруг, найду новое пустое место и там палочку положу
    ;; Передаю пятну номер статьи, которая тут теперь лежит
    ask patch-here [set pagenum [t-pagenum] of myself]
   set wikilog lput (se [who] of self [t-pagenum] of self "edit" ) wikilog 
    set pcolor yellow
    set color white
    set t-pagenum 0
    get-away ]
  [ rt random 360
    fd 1
    put-down-chip ]

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

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

to logs_to_sociogram
ask patches [set pcolor 0]
  ;; пока связи идут только от редакторов к автору статьи
  foreach edits [
    let friend1 item 0 ?
    let p1 item 1 ?
    let friend2 first first filter [(p1 = item 1 ?) and ("create" = item 2 ?)] wikilog 
    if friend1 != friend2 [
    ask turtle friend1 [ create-friendbond-to turtle friend2 ]

  repeat 8 [layout-spring  turtles links 1 5 7 ]

to-report edits
report filter ["edit" = item 2 ?] wikilog

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

There are 2 versions of this model.

Uploaded by When Description Download
Evgeny Patarakin over 1 year ago Information about the model is added Download this version
Evgeny Patarakin almost 2 years ago Initial upload Download this version

Attached files

File Type Description Last updated
TermitesLog.png preview Preview for 'TermitesLog' almost 2 years ago, by Evgeny Patarakin Download

This model does not have any ancestors.


Graph of models related to 'TermitesLog'