Communication-T-T Example
Model was written in NetLogo 5.0.4
•
Viewed 812 times
•
Downloaded 87 times
•
Run 1 time
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Click to Run Model
turtles-own [ message? ;; true or false: has this turtle gotten the message yet? ] to setup clear-all crt 500 [ set message? false setxy random-xcor random-ycor ] ask one-of turtles [ set message? true ] ;; give the message to one of the turtles ask turtles [ recolor ] reset-ticks end to go ask turtles [ move ] ask turtles [ communicate ] ask turtles [ recolor ] tick end ;; move randomly to move ;; turtle procedure fd random 4 ;; turn a random amount between -40 and 40 degrees, ;; keeping the average turn at 0 rt random 40 lt random 40 end ;; the core procedure! to communicate ;; turtle procedure if any? other turtles-here with [message?] [ set message? true ] end ; color turtles with message red, and those without message blue to recolor ;; turtle procedure ifelse message? [ set color red ] [ set color blue ] end ; Public Domain: ; To the extent possible under law, Uri Wilensky has waived all ; copyright and related or neighboring rights to this model.
There are 10 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Communication-T-T Example.png | preview | Preview for 'Communication-T-T Example' | over 11 years ago, by Uri Wilensky | Download |
This model does not have any ancestors.
This model does not have any descendants.