Child of TermitesLog
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
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.
HOW TO USE IT
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 Numberofturns slider controls the number of turns.
Logstosociogram button
Logstosociogram button switches all the chips off the screen and only shows linkage between agents carrying one and the same chip.
THINGS TO NOTICE
Чем меньше щепок, тем быстрее образуются связи между участниками
THINGS TO TRY
EXTENDING THE MODEL
NETLOGO FEATURES
RELATED MODELS
- NetLogo Termites model
HOW TO CITE
COPYRIGHT AND LICENSE
Comments and Questions
extensions [nw csv] patches-own [pagenum] turtles-own [ t-pagenum community ;; ] directed-link-breed [friendbonds friendbond] ; globals [ wikilog ; log, куда записываются pages ;; перечень созданных страниц communities ;; перечень сообществ Mdl ; модулярность текущего сообщества ] to setup clear-all 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 ] end to go ;; turtle procedure if length wikilog > number_of_turns [stop] ;; ограничитель числа ходов 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 [ ;; Если это палочка, которую не брали, то надо записать в журнал, что я создал эту новую палочку 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 ] ;; а если ты не нашел, то продолжай поиск end to find-new-pile ;; turtle procedure -- look for yellow patches ;; это он ищет новую палочку, как только найдет - остановится и запустится put-down-chip if pcolor != yellow [ wiggle find-new-pile ] end 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 ] end to get-away ;; turtle procedure -- escape from yellow 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 to save_log file-open user-new-file foreach wikilog [ [x] -> file-print csv:to-row x ] end to logs_to_sociogram ask patches [set pcolor 0] ;; пока связи идут только от редакторов к автору статьи foreach edits [ [?1] -> let friend1 item 0 ?1 let p1 item 1 ?1 let friend2 first first filter [ [??1] -> (p1 = item 1 ??1) and ("create" = item 2 ??1) ] wikilog if friend1 != friend2 [ ask turtle friend1 [ create-friendbond-to turtle friend2 ] ] ] repeat 8 [layout-spring turtles links 1 5 7 ] end to-report edits report filter [ [?1] -> "edit" = item 2 ?1 ] wikilog end ;; to ColorCommunity ask turtles [home st set size 5 set label "" set color 9.9] ask links [hide-link] set communities nw:louvain-communities set communities filter [x1 -> count x1 > 2] communities set communities sort-by [[ x1 x2] -> count x1 > count x2] communities if length communities > 14 [set communities sublist communities 0 13 ] let colors sublist base-colors 0 (length communities) let radius max-pxcor * 3 / 4 let dist n-values length communities [ i -> i ] ask turtles [set heading 0] let angle 360 / length colors (foreach reverse communities reverse colors dist [ [community1 col dist1] -> ask community1 [ set color col set label "" rt angle * dist1 fd (radius ) ;; rt random 360 ] ;; let Centr max-one-of community1 [nw:betweenness-centrality] ask links with [(member? end1 community1) and (member? end2 community1) ] [show-link] repeat 7 [layout-spring community1 links with [(member? end1 community1) and (member? end2 community1) ] 5 2 4 ] ]) end to CentralCommunity ask turtles [home st set color 9.9 set label ""] ask links [hide-link] set communities nw:louvain-communities set communities filter [x1 -> count x1 > 2] communities set communities sort-by [[ x1 x2] -> count x1 > count x2] communities if length communities > 14 [set communities sublist communities 0 14 ] let colors sublist base-colors 0 (length communities) let radius max-pxcor - 15 ask turtles [set heading 0] let angle 360 / length colors (foreach communities colors [ [community1 col] -> ask community1 [ set color col ] let Centr max-one-of community1 [nw:betweenness-centrality] layout-radial community1 links with [(member? end1 community1) and (member? end2 community1) ] Centr ask links with [(member? end1 community1) and (member? end2 community1) ] [show-link] ]) end to See_Community [group] ;; show CL ask turtles [ht set label "" set size 1] ask links [hide-link] let NewGroup group let GroupLinks links with [(member? end1 NewGroup) and (member? end2 NewGroup) ] ask NewGroup [ st set size 0.8 set label who ] ask GroupLinks [show-link ] ;; repeat 7 [ layout-spring NewGroup GroupLinks 1 10 7 ] end
There is only one version of this model, created about 8 years ago by Evgeny Patarakin.
Attached files
No files