Preference for Belief and Issue Polarization - with Avowal

No preview image

1 collaborator

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 114 times • Downloaded 5 times • Run 0 times
Download the 'Preference for Belief and Issue Polarization - with Avowal' modelDownload this modelEmbed this model

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


## WHAT IS IT?

We present a network model with an empirically-validated structure that demonstrates how a dynamic interaction between the preference for belief and common structures of epistemic communities can turn very small unequal distributions of initial beliefs into full-blown polarization.

## HOW IT WORKS

Hitting "setup" will create a network of agents of the specified type (either random or small world). The degree distribution and clustering distributions ("bubble" coefficeint) are then shown to the right of the depicted network. White edges are connections between agents that may or may not share ideologies. Colored edges (purple or orange) are connections between agents that have the same ideology. There are five ideologies: 1 very liberal, 2 liberal, 3 moderate, 4 conservative, 5 very conservative. Purple (/violet) is the color used for both liberal categories, and orange for the conservatives.

Agents have three belief states: empty-belief, belief-yes, and belief-no. By default at the beginning, all agents have empty-belief, i.e. they have not formed a belief about some proposition S. A few agents in the community receive ``news'' about S, and some will form belief-yes and others belief-no. From these initial seeding conditions, the process of belief spread consists of cycling through the following two steps:

1. Agents with belief-yes or belief-no invite their empty-belief friends in their epistemic community to accept their belief, b.

2. Agents with empty-belief and being invited to believe b will either: i) adopt b if it is congruent with their ideology, or ii) if b is incongruent with their ideology, adopt b with probability 1 minus motivated-bias.

## HOW TO USE IT

First decide on the network type. Then decide on how to seed the news to the network using "StartType". "P" is a purple (violet in Netlogo) agent, "O" is an orange agent, and "M" is a moderate agent. The lower case letters following these uppercase letters indicates how many token beliefs are to be assigned. "n" means a belief-no and "y" means a belief-yes. So "PnOyyn" means one belief-no was assigned to a purple agent, two belief-yes were assigned to two orange agents, and a belief-no was assigned to an orange agent.

Click "setup". Then look at the network properties in the different monitors and distribution plots.

Decide on how much motivated bias agents should have. 0 means agents will accept any invitation to believe, regardless of whether that belief is congruent with their ideology ("yes" is associated with purple and "no" with orange). 1 means agents will only accept invitations to believe something that is congruent with their ideology. The "motivated-bias" slider controls the middle ideologies (e.g. orange) and "max-motivated-bias controls the extreme ideologies (e.g. very orange).

Clicking "go" will run the model until all agents have formed some belief or other, using the two step cycle described above.

## THINGS TO NOTICE

Any single run has a fair bit of stochasticity, but you should notice that typically a correlation develops between beliefs and ideology (e.g. "yes" given ideology purple (or "lib")) for different settings of start type and motivated bias.

## THINGS TO TRY

When motivated bias is high, the correlation between beliefs and ideology tends to be high. But even when motivated bias is low, certain start conditions, e.g. PyyOnn, can still generate these correlations.

## CREDITS AND REFERENCES

(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)

Comments and Questions

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

Click to Run Model

;; in this model what is spread at first is just an avowal,
;; and then people form their belief through aggregation (by majority),
;; and then they avow their belief to neighbors, and so on.

globals [
  infinity                               ;; used to denote distance between two turtles which don't have a connected or unconnected path between them
  average-path-length                  ;; average path length of the network
  clustering-coefficient               ;; the clustering coefficient of the network; this is the average of clustering coefficients of all turtles
  orange-clustering-coefficient
  violet-clustering-coefficient
  average-degree
  check-connected-and-measure
  average-bubble
  equilibrium                   ;;if the system is in equilibrium, stop
  N ;number of nodes
  vlibNo ; num of very liberals that believe No
  vlibYes ; num of very liberal that believe Yes
  libNo ; num of liberals that...
  libYes
  mYes ; num of moderate that believe Yes
  mNo ;
  conYes
  conNo
  vconYes
  vconNo
  No.vlib ;prob of belief no given vlib
  Yes.vlib
  No.lib
  Yes.lib
  No.m
  Yes.m
  No.vcon
  Yes.vcon
  No.con
  Yes.con
]

;;;;;;;;;;;;;;;;;;;;;;;;
;;; Agent Attributes ;;;
;;;;;;;;;;;;;;;;;;;;;;;;
turtles-own[
 node-clustering-coefficient
 same-type-clustering-coefficient
 distance-from-other-turtles ;; list of distances of this node from other turtles
 bubble-coefficient
 ideology-level ;; 0 means moderate, 1 means liberal/conservative, 2 means very liberal/conservative
 ideology ;1 very liberal, 2 liberal, 3 moderate, 4 conservative, 5 very conservative (Purple for lib, orange for con)
 belief ;0 unknown, 1 no, 2 yes;; yes is associated with violet, no with orange
 avowals-heard
 changed-belief?
]


;;;;;;;;;;;;;;;;;;;;;;;;
;;; Link Attributes ;;;
;;;;;;;;;;;;;;;;;;;;;;;;
links-own[
  ideology-diversity
]




;;;;;;;;;;;;;;;;;;;;;;;;
;;; Setup Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;;;

to setup
  clear-all
  set infinity 99999 ;; just an arbitrary choice for a large number, needed for path length computation
  set-default-shape turtles "circle"
  make-nodes 200
  make-edges
  measure-bubble
  make-ideology
  ask turtles [
    set avowals-heard []
    set changed-belief? false
  ]
  ;block-by-ideology ; this removes all links between very liberals and very conservatives
  measure-link-diversity
  if layout? [ layout ]
  seed-info
  ;while [count turtles with [belief = 1] = 0 or count turtles with [belief = 2] = 0] [
  ;  seed-info]
  set equilibrium 0
  measure-ideology-info
  reset-ticks
end 

;;;;;;;;;;;;;;;;;;;;;;;
;;; Main Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;;

to reset-beliefs
  seed-info
  reset-ticks
end 

to go
  belief-spread
  measure-ideology-info
  tick
  if not member? true [changed-belief?] of turtles [stop]
  ;let b count turtles with [belief = 0]
  ;ifelse equilibrium = b [stop] [set equilibrium b]
end 

to belief-spread
  ask turtles with [belief != 0] [
    ask link-neighbors [
            if ideology-level = 0 [;moderates use the baseline level set by the motivated-bias global variable
        ifelse random-float 1 < motivated-bias [
          if color = orange and [belief] of myself = 1 [set avowals-heard lput 1 avowals-heard ]
          if color = violet and [belief] of myself = 2 [set avowals-heard lput 2 avowals-heard]
        ]
        [
          set avowals-heard lput [belief] of myself avowals-heard
          ;set belief [belief] of myself
        ]
      ]
      if ideology-level = 2 [;highest ideologies use the max bias level set by the max-motivated-bias global variable
        ifelse random-float 1 < max-motivated-bias [
          if color = orange and [belief] of myself = 1 [set avowals-heard lput 1 avowals-heard]
          if color = violet and [belief] of myself = 2 [set avowals-heard lput 2 avowals-heard]
        ]
        [
          set avowals-heard lput [belief] of myself avowals-heard
         ; set belief [belief] of myself
        ]
      ]
      if ideology-level = 1 [; level 1 ideologies use the mid point of the two bias levels
        let mb motivated-bias + ((max-motivated-bias - motivated-bias) / 2)
        ifelse random-float 1 < mb [
          if color = orange and [belief] of myself = 1 [set avowals-heard lput 1 avowals-heard]
          if color = violet and [belief] of myself = 2 [set avowals-heard lput 2 avowals-heard]
        ]
        [
          set avowals-heard lput [belief] of myself avowals-heard
          ;set belief [belief] of myself
        ]
      ]
    ]
  ]
  ask turtles [
   ifelse (member? 1 modes avowals-heard) and (member? 2 modes avowals-heard)  [
      ;if the modes include both 1 and 2 (or neither), this is a tie and so the agent does not update
    ]
    [; else one of 1 or 2 is the mode and the agent will update their belief to the most common avowal
      let old-b belief
      if member? 1 modes avowals-heard [set belief 1 ]
      if member? 2 modes avowals-heard [set belief 2 ]
      ifelse old-b = belief [set changed-belief? false] [set changed-belief? true]
    ]
    set avowals-heard []
  ]
end 

to seed-info
  ask turtles [set belief 0]
  if StartType = "PyyOnn" [
    ask n-of 2 turtles with [ideology <= 2] [set belief 2]
    ask n-of 2 turtles with [ideology >= 4] [set belief 1] ]
  if StartType = "PynOyn" [
    ask n-of 1 turtles with [ideology <= 2] [set belief 2]
    ask n-of 1 turtles with [ideology >= 4] [set belief 1]
    ask n-of 1 turtles with [ideology <= 2] [set belief 1]
    ask n-of 1 turtles with [ideology >= 4] [set belief 2]
  ]
  if StartType = "PnnOyy" [
    ask n-of 2 turtles with [ideology <= 2] [set belief 1]
    ask n-of 2 turtles with [ideology >= 4] [set belief 2] ]
  if StartType = "Myynn" [
    ask n-of 2 turtles with [ideology = 3] [set belief 2]
    ask n-of 2 turtles with [ideology = 3] [set belief 1] ]
  if StartType = "Myyyn" [
    ask n-of 3 turtles with [ideology = 3] [set belief 2]
    ask n-of 1 turtles with [ideology = 3] [set belief 1] ]
  if StartType = "Mynnn" [
    ask n-of 1 turtles with [ideology = 3] [set belief 2]
    ask n-of 3 turtles with [ideology = 3] [set belief 1] ]
  if StartType = "PyyyOn" [
    ask n-of 3 turtles with [ideology <= 2] [set belief 2]
    ask n-of 1 turtles with [ideology >= 4] [set belief 1]
  ]
  if StartType = "PyyOyn" [
    ask n-of 2 turtles with [ideology <= 2] [set belief 2]
    ask n-of 1 turtles with [ideology >= 4] [set belief 1]
    ask n-of 1 turtles with [ideology >= 4] [set belief 2]
  ]
  if StartType = "PyOyyn" [
    ask n-of 1 turtles with [ideology <= 2] [set belief 2]
    ask n-of 1 turtles with [ideology >= 4] [set belief 1]
    ask n-of 2 turtles with [ideology >= 4] [set belief 2]
  ]
  if StartType = "PnOyyy" [
    ask n-of 1 turtles with [ideology <= 2] [set belief 1]
    ask n-of 3 turtles with [ideology >= 4] [set belief 2]
  ]
  if StartType = "Pyynn" [
    ask n-of 2 turtles with [ideology <= 2] [set belief 2]
    ask n-of 2 turtles with [ideology <= 2] [set belief 1]
  ]
  if StartType = "Pyyyn" [
    ask n-of 3 turtles with [ideology <= 2] [set belief 2]
    ask n-of 1 turtles with [ideology <= 2] [set belief 1]
  ]
  if StartType = "Pynnn" [
    ask n-of 1 turtles with [ideology <= 2] [set belief 2]
    ask n-of 3 turtles with [ideology <= 2] [set belief 1]
  ]
  if StartType = "Oynnn" [
    ask n-of 1 turtles with [ideology >= 4] [set belief 2]
    ask n-of 3 turtles with [ideology >= 4] [set belief 1]
  ]
  if StartType = "Oyynn" [
    ask n-of 2 turtles with [ideology >= 4] [set belief 2]
    ask n-of 2 turtles with [ideology >= 4] [set belief 1]
  ]
  if StartType = "Oyyyn" [
    ask n-of 3 turtles with [ideology >= 4] [set belief 2]
    ask n-of 1 turtles with [ideology >= 4] [set belief 1]
  ]
end 

to block-by-ideology
  ask links [if min [ideology] of both-ends = 1 and max [ideology] of both-ends = 5 [die]]
end 

to make-ideology
  ask turtles [ set ideology-level -1]
  let num-mod round (0.35 * count turtles)
  let num-ext round (0.25 * count turtles)
  ask min-n-of num-mod turtles [bubble-coefficient] [ set ideology-level 0 ]
  ask max-n-of num-ext turtles [bubble-coefficient] [ set ideology-level 2]
  ask turtles with [ideology-level = -1 ] [set ideology-level 1]
  ask turtles [
    if color = violet and ideology-level = 2 [set ideology 1]
    if color = violet and ideology-level = 1 [set ideology 2]
    if ideology-level = 0 [set ideology 3]
    if color = orange and ideology-level = 1 [set ideology 4]
    if color = orange and ideology-level = 2 [set ideology 5]
  ]
end 

to make-edges
  ifelse small-world? = true [;create a small-wrold network with short average paths (2-3) and high clustering (0.3-0.6)
    ask turtles [
      let cluster min-n-of 14 other turtles [distance myself]
      create-links-with cluster [set color white]
      let same-type n-of 3 other turtles with [color = [color] of myself]
      create-links-with same-type [set color [color] of myself]
      let other-type n-of 0 other turtles with [color != [color] of myself]
      create-links-with other-type [set color gray]
    ]
  ]
  [;else make a random graph (short paths, but low clustering)
    ask turtles [
      let same-type n-of 7 other turtles with [color = [color] of myself]
      create-links-with same-type [set color [color] of myself]
      let other-type n-of 4 other turtles with [color != [color] of myself]
      create-links-with other-type [set color gray]
    ]
  ]
end 

to make-nodes [t]
  create-turtles t
 [
    setxy random-xcor random-ycor
    ifelse random-float 1 < .5[ ;this controls how much of a bubble agents are in
      if xcor > 0 [set color orange]
      if xcor <= 0 [set color violet]
    ]
    [
      if xcor > 0 [set color violet]
      if xcor <= 0 [set color orange]
    ]
  ]
end 

to measure-link-diversity
  ask links [
    if min [ideology] of both-ends = 1 and max [ideology] of both-ends = 1 [set ideology-diversity 0]
    if min [ideology] of both-ends = 1 and max [ideology] of both-ends = 2 [set ideology-diversity 1]
    if min [ideology] of both-ends = 1 and max [ideology] of both-ends = 3 [set ideology-diversity 2]
    if min [ideology] of both-ends = 1 and max [ideology] of both-ends = 4 [set ideology-diversity 3]
    if min [ideology] of both-ends = 1 and max [ideology] of both-ends = 5 [set ideology-diversity 4]
    if min [ideology] of both-ends = 2 and max [ideology] of both-ends = 2 [set ideology-diversity 0]
    if min [ideology] of both-ends = 2 and max [ideology] of both-ends = 3 [set ideology-diversity 1]
    if min [ideology] of both-ends = 2 and max [ideology] of both-ends = 4 [set ideology-diversity 2]
    if min [ideology] of both-ends = 2 and max [ideology] of both-ends = 5 [set ideology-diversity 3]
    if min [ideology] of both-ends = 3 and max [ideology] of both-ends = 3 [set ideology-diversity 0]
    if min [ideology] of both-ends = 3 and max [ideology] of both-ends = 4 [set ideology-diversity 1]
    if min [ideology] of both-ends = 3 and max [ideology] of both-ends = 5 [set ideology-diversity 2]
    if min [ideology] of both-ends = 4 and max [ideology] of both-ends = 4 [set ideology-diversity 0]
    if min [ideology] of both-ends = 4 and max [ideology] of both-ends = 5 [set ideology-diversity 1]
    if min [ideology] of both-ends = 5 and max [ideology] of both-ends = 5 [set ideology-diversity 0]
  ]
end 

to measure-ideology-info
  set N count turtles
  set vlibNo count turtles with [ideology = 1 and belief = 1]
  set vlibYes count turtles with [ideology = 1 and belief = 2]
  set libNo count turtles with [ideology = 2 and belief = 1]
  set libYes count turtles with [ideology = 2 and belief = 2]
  set mYes count turtles with [ideology = 3 and belief = 2]
  set mNo count turtles with [ideology = 3 and belief = 1]
  set conYes count turtles with [ideology = 4 and belief = 2]
  set conNo count turtles with [ideology = 4 and belief = 1]
  set vconYes count turtles with [ideology = 5 and belief = 2]
  set vconNo count turtles with [ideology = 5 and belief = 1]
  ifelse vlibNo + vlibYes != 0 [set No.vlib vlibNo / (vlibNo + vlibYes)] [set No.vlib 999999999]
  ifelse vlibNo + vlibYes != 0 [set Yes.vlib vlibYes / (vlibNo + vlibYes)] [set Yes.vlib 999999999]
  ifelse libNo + libYes != 0 [set No.lib libNo / (libNo + libYes)] [set No.lib 999999999]
  ifelse libNo + libYes != 0 [set Yes.lib libYes / (libNo + libYes)] [set Yes.lib 999999999]
  ifelse mNo + mYes != 0 [set No.m mNo / (mNo + mYes)] [set No.m 999999999]
  ifelse mNo + mYes != 0 [set Yes.m mYes / (mNo + mYes)] [set Yes.m 999999999]
  ifelse conNo + conYes != 0 [set No.con conNo / (conNo + conYes)] [set No.con 999999999]
  ifelse conNo + conYes != 0 [set Yes.con conYes / (conNo + conYes)] [set Yes.con 999999999]
  ifelse vconNo + vconYes != 0 [set No.vcon vconNo / (vconNo + vconYes)] [set No.vcon 999999999]
  ifelse vconNo + vconYes != 0 [set Yes.vcon vconYes / (vconNo + vconYes)] [set Yes.vcon 999999999]
end 

to measure-bubble
  ask turtles [
    set bubble-coefficient count link-neighbors with [color = [color] of myself] / count link-neighbors
  ]
  set average-bubble mean [bubble-coefficient] of turtles
end 

to measure
  ;;find the average degree
  set average-degree mean [count link-neighbors] of turtles
  set check-connected-and-measure do-calculations
end 

to same-type-measure
  find-same-type-clustering-coefficient
end 


;;;;;;;;;;;;;;
;;; Layout ;;;
;;;;;;;;;;;;;;

;; resize-nodes, change back and forth from size based on degree to a size of 1

to resize-nodes
  ifelse all? turtles [size <= 1]
  [
    ;; a node is a circle with diameter determined by
    ;; the SIZE variable; using SQRT makes the circle's
    ;; area proportional to its degree
    ask turtles [ set size sqrt count link-neighbors ]
  ]
  [
    ask turtles [ set size 1 ]
  ]
end 

to layout
  ;; the number 3 here is arbitrary; more repetitions slows down the
  ;; model, but too few gives poor layouts
  repeat 3 [
    ;; the more turtles we have to fit into the same amount of space,
    ;; the smaller the inputs to layout-spring we'll need to use
    let factor sqrt count turtles
    ;; numbers here are arbitrarily chosen for pleasing appearance
    layout-spring turtles links (1 / factor) (7 / factor) (1 / factor)
    display  ;; for smooth animation
  ]
  ;; don't bump the edges of the world
  let x-offset max [xcor] of turtles + min [xcor] of turtles
  let y-offset max [ycor] of turtles + min [ycor] of turtles
  ;; big jumps look funny, so only adjust a little each time
  set x-offset limit-magnitude x-offset 0.1
  set y-offset limit-magnitude y-offset 0.1
  ask turtles [ setxy (xcor - x-offset / 2) (ycor - y-offset / 2) ]
end 

to-report limit-magnitude [number limit]
  if number > limit [ report limit ]
  if number < (- limit) [ report (- limit) ]
  report number
end 




;; do-calculations reports true if the network is connected,
;;   and reports false if the network is disconnected.
;; (In the disconnected case, the average path length does not make sense,
;;   or perhaps may be considered infinite)

to-report do-calculations

  ;; set up a variable so we can report if the network is disconnected
  let connected? true

  ;; find the path lengths in the network
  find-path-lengths

  let num-connected-pairs sum [length remove infinity (remove 0 distance-from-other-turtles)] of turtles

  ;; In a connected network on N nodes, we should have N(N-1) measurements of distances between pairs,
  ;; and none of those distances should be infinity.
  ;; If there were any "infinity" length paths between nodes, then the network is disconnected.
  ;; In that case, calculating the average-path-length doesn't really make sense.
  ifelse ( num-connected-pairs != (count turtles * (count turtles - 1) ))
  [
      set average-path-length infinity
      ;; report that the network is not connected
      set connected? false
  ]
  [
    set average-path-length (sum [sum distance-from-other-turtles] of turtles) / (num-connected-pairs)
  ]
  ;; find the clustering coefficient and add to the aggregate for all iterations
  find-clustering-coefficient
  find-same-type-clustering-coefficient
  ;; report whether the network is connected or not
  report connected?
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Clustering computations ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to-report in-neighborhood? [ hood ]
  report ( member? end1 hood and member? end2 hood )
end 

to find-clustering-coefficient
  ifelse all? turtles [count link-neighbors <= 1]
  [
    ;; it is undefined
    ;; what should this be?
    set clustering-coefficient 0
  ]
  [
    let total 0
    ask turtles with [ count link-neighbors <= 1]
      [ set node-clustering-coefficient "undefined" ]
    ask turtles with [ count link-neighbors > 1]
    [
      let hood link-neighbors
      set node-clustering-coefficient (2 * count links with [ in-neighborhood? hood ] /
                                         ((count hood) * (count hood - 1)) )
      ;; find the sum for the value at turtles
      set total total + node-clustering-coefficient
    ]
    ;; take the average
    set clustering-coefficient total / count turtles with [count link-neighbors > 1]
  ]
end 

to find-same-type-clustering-coefficient
  ifelse all? turtles [count link-neighbors with [color = [color] of myself] <= 1]
  [
    ;; it is undefined
    ;; what should this be?
    set orange-clustering-coefficient 0
    set violet-clustering-coefficient 0
  ]
  [
    ask turtles with [ count link-neighbors with [color = [color] of myself] <= 1]
      [ set same-type-clustering-coefficient "undefined" ]
    ask turtles with [ count link-neighbors with [color = [color] of myself] > 1]
    [
      let hood link-neighbors with [color = [color] of myself]
      set same-type-clustering-coefficient (2 * count links with [ in-neighborhood? hood ] /
                                         ((count hood) * (count hood - 1)) )
    ]
    ;; take the average
    ;set clustering-coefficient total / count turtles with [count link-neighbors > 1]
    set orange-clustering-coefficient mean [same-type-clustering-coefficient] of turtles with [color = orange]
    set violet-clustering-coefficient mean [same-type-clustering-coefficient] of turtles with [color = violet]
  ]
end 


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Path length computations ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Implements the Floyd Warshall algorithm for All Pairs Shortest Paths
;; It is a dynamic programming algorithm which builds bigger solutions
;; from the solutions of smaller subproblems using memoization that
;; is storing the results.
;; It keeps finding incrementally if there is shorter path through
;; the kth node.
;; Since it iterates over all turtles through k,
;; so at the end we get the shortest possible path for each i and j.

to find-path-lengths
  ;; reset the distance list
  ask turtles
  [
    set distance-from-other-turtles []
  ]

  let i 0
  let j 0
  let k 0
  let node1 one-of turtles
  let node2 one-of turtles
  let node-count count turtles
  ;; initialize the distance lists
  while [i < node-count]
  [
    set j 0
    while [j < node-count]
    [
      set node1 turtle i
      set node2 turtle j
      ;; zero from a node to itself
      ifelse i = j
      [
        ask node1 [
          set distance-from-other-turtles lput 0 distance-from-other-turtles
        ]
      ]
      [
        ;; 1 from a node to it's neighbor
        ifelse [ link-neighbor? node1 ] of node2
        [
          ask node1 [
            set distance-from-other-turtles lput 1 distance-from-other-turtles
          ]
        ]
        ;; infinite to everyone else
        [
          ask node1 [
            set distance-from-other-turtles lput infinity distance-from-other-turtles
          ]
        ]
      ]
      set j j + 1
    ]
    set i i + 1
  ]
  set i 0
  set j 0
  let dummy 0
  while [k < node-count]
  [
    set i 0
    while [i < node-count]
    [
      set j 0
      while [j < node-count]
      [
        ;; alternate path length through kth node
        set dummy ( (item k [distance-from-other-turtles] of turtle i) +
                    (item j [distance-from-other-turtles] of turtle k))
        ;; is the alternate path shorter?
        if dummy < (item j [distance-from-other-turtles] of turtle i)
        [
          ask turtle i [
            set distance-from-other-turtles replace-item j distance-from-other-turtles dummy
          ]
        ]
        set j j + 1
      ]
      set i i + 1
    ]
    set k k + 1
  ]
end 

There is only one version of this model, created over 1 year ago by Bert Baumgaertner.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.