Asymmetric broadcast consensus
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
ACKNOWLEDGMENT
Luka Grgičević PhD, NTNU i Ålesund, IIR
WHAT IS IT?
For a more detailed explanation send me an email to luka.grgicevic@ntnu.no
HOW IT WORKS
In this algorithm, one node "i" is activated and it broadcasts the colour to its neighbour "j". Neighbours’ new value "x_j" is then calculated to be somewhere in between the caller node "i" and node "j", depending on the variable "Q" which determines the percentage node "j" is going to change its values toward the caller. The algorithm works also with multiple callers activated and broadcasting its colour to its neighbours at the same time.
HOW TO USE IT
Click "SETUP", "CONNECT" the undirected graph according to the number of nodes chosen and the average node degree (depends on "in" and "out" connections). Choose the "Q" value, that determines the weight each node makes when changing its colour. Click "GO" and speed up if needed.
THINGS TO TRY
Try to tune the "Q" value to reach the initial average consensus.
EXTENDING THE MODEL
Try to implement multiple broadcast nodes. A more advanced task could be to implement a communication loss (occasionally some messages are not received by "j" nodes) and make a modification based on the preservation of mass to still reach the consensus.
HOW TO CITE
For the model itself:
Visit - https://github.com/GrgicevicLukaNTNU
Please cite the NetLogo software as:
- Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
COPYRIGHT AND LICENSE
CC
Comments and Questions
turtles-own [past-state present-state color-initial] ; Create nodes to setup clear-all ask patches [set pcolor white] let average 0 create-turtles num-nodes [ set shape "circle" setxy random-xcor random-ycor set color random 140 set color-initial color set average average + color ] ; Print the initial average print (word "Initial average is: " (average / num-nodes)) reset-ticks end ; Asymmetric broadcast algorithm to go ; Let one node make a broadcast ask one-of turtles [ carefully [ ; If there are listeners, tell them to change their values somewhere in between, according to the ratio Q let P color ask link-neighbors [set color (color * Q + P * (1 - Q))] ] ; If there are no links, remove the node [ask turtle who [die]] ] ; Plot the pens on the graph for each node ask turtles [ create-temporary-plot-pen (word who) set-plot-pen-color color-initial plot color] tick end ; Connect the nodes to setup-spatially-clustered-network let num-links (average-node-degree * num-nodes) / 2 while [count links < num-links ] [ ask one-of turtles [ let choice (min-one-of (other turtles with [not link-neighbor? myself]) [distance myself]) if choice != nobody [ create-link-with choice ] ] ] ; Make the network look a little prettier repeat 10 [ layout-spring turtles links 0.3 (world-width / (sqrt num-nodes)) 1 ] end
There is only one version of this model, created over 2 years ago by Luka Grgicevic.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Asymmetric broadcast consensus.png | preview | Preview for 'Asymmetric broadcast consensus' | over 2 years ago, by Luka Grgicevic | Download |
This model does not have any ancestors.
This model does not have any descendants.