The Weakness of Strong Ties

No preview image

2 collaborators

Default-person Siebren Kooistra (Author)
Default-person Andreas Flache (Teacher)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.1.1 • Viewed 48 times • Downloaded 2 times • Run 0 times
Download the 'The Weakness of Strong Ties' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

globals [collectivegood_contributions compliant_control relational_control collectivegood_aspirations approval_aspirations seed]
turtles-own [cooperation_propensity satisfaction_cooperation workstate approval_recieved cooperation_reinforcer incoming_approval_propensities compliancy_numerator squared_deviation_approval squared_deviation_cooperation]
links-own [approval_propensity satisfaction_approval approvalstate approval_reinforcer in_deviation_squared out_deviation_squared deviations_product in_approval out_approval in_deviation out_deviation]

to setup
  ca
  ifelse Use_user_seed? = TRUE [set seed Seed_input] [set seed new-seed set Seed_input seed]
  random-seed seed
  ask patches [set pcolor white]                                                                                         ;For as much visual clarity as is possible given the number of links, the background is set a white colour.
  create-turtles workteam_size                                                                                           ;workteam_size is variable, so as to allow experimentation with the effect of group size.
  layout-circle turtles 15                                                                                               ;The turtles are arranged in a circle as fits a completely connected network.
  ask turtles [
    facexy 0 0
    set shape "square"                                                                                                   ;Because the facing of the turle does not matter, the turtle is made to face the center of the world and given a square shape.
    set color ((who * 10) + 5)                                                                                           ;The turtles are given a colour which contrasts with the white background, and each turtles is assigned a colour arbitrarily related to its who number.
    create-links-to other turtles [                                                                                      ;All turtles are connected to each other...
      set color [color] of myself                                                                                        ; ...the links are given the colour of thier turtle of origin...
      set approval_propensity initial_approval_propensity                                                                ; ...and because approval is controlled by the links, approval propensity is determined for them instead of the turtles.
    ]
    set cooperation_propensity initial_cooperation_propensity                                                            ;The turtles, meanwhile, are granted a certain propensity to contribute to the collective good (cooperate).
  ]
  set collectivegood_aspirations (0.5 * (1 + cooperation_approval_value * (workteam_size - 1) - cooperation_cost))       ;The aspirations by which turtles evaluate the costs and benefits of cooperation are the midpoint of the reward distribution.
  set approval_aspirations (0.5 * (1 / workteam_size + approvalofothers_value - approval_cost))                          ;The same applies to the aspirations by which the costs and benefits of approval of alter are evaluated.
  reset-ticks
end 

to go
  if Time_Limit? = TRUE and ticks >= Number_of_Iterations [stop]
  cooperate
  approve
  reward_cooperation
  reward_approval
  learn_cooperation
  learn_approval
  measure-compliant-control
  measure-relational-control
  tick
end 

to cooperate
  ask turtles [                                                                                         ;The turtle decides whether to cooperate or not based on the propensity for cooperation it adopted in the last round.
    ifelse random 1000001 > 1000000 * cooperation_propensity [set workstate 0 set size 1] [set workstate 1 set size 2]        ;The turtle does not cooperate if the quasi-randomly generated number between 0 and 100 is greater than its cooperation_propensity value,
  ]                                                                                                     ;because this setup means that a higher cooperation propensity is less likely to be surpassed and so more likely to lead to the actor cooperating.
  set collectivegood_contributions ((count turtles with [workstate = 1]) / workteam_size)               ;This calculates the total result produced by all cooperating turtles.
end 

to approve
  ask turtles [
    ask my-out-links [                                                                                                                    ;To approve of other turtles, each turtle has a link to every other turtle and this link approves or does not approve of the turtle at the other end of the link.
      ifelse random 1000001 > 1000000 * approval_propensity [set thickness 0 set approvalstate 0] [set thickness 0.3 set approvalstate 1] ;The decision to approve is taken in a similar manner to the decision to cooperate, except that the link takes the decision to allow unique approval propensities within each dyad. If approval if given, the width of the link increases to provide visual feedback.
    ]
    set approval_recieved (count my-in-links with [approvalstate = 1]) * cooperation_approval_value                                       ;The total approval recieved is calculated by the turtles, not by the links (who are confined to a single dyad).
  ]
end 

to reward_cooperation
  ask turtles [
    set satisfaction_cooperation (collectivegood_contributions + approval_recieved - cooperation_cost * workstate - collectivegood_aspirations)                                                              ;Each turtle decides whether it is satisfied with the cooperation decision it made this iteration by comparing its cost-benefit balance with its aspiration level. The costs are the cost of cooperation (the cost of approval is irrelevant for cooperating, as it does not incur those costs). The benefits are the actor's share in the collective good and the approval it has recieved (regardless of whether this results from its work decision).
    set cooperation_reinforcer (learning_parameter * satisfaction_cooperation) / (((workteam_size - 2) / workteam_size + cooperation_approval_value * (workteam_size - 1) + cooperation_cost) / 2)           ;The turtle then uses its satisfaction as input to its learning reinforcer (whose denominator is the maximum possible satifaction from cooperation). This makes it so that a more dissatisfactory or dissatisfactory result has a larger effect on decisions on future iterations.
    if cooperation_reinforcer > 1 [set cooperation_reinforcer 1]
    if cooperation_reinforcer < -1 [set cooperation_reinforcer -1]
  ]
end 

to reward_approval
  ask turtles [
    ask my-out-links [
      set satisfaction_approval ([workstate] of end2 / workteam_size + approvalofothers_value * [approvalstate] of link ([who] of end2) ([who] of myself) - approval_cost * approvalstate - [approval_aspirations] of myself)   ;Again, approval is processed by links instead of turtles, in order to allow for dyad-specific satisfaction calculations. In this case, what is weighted against the aspiration level is the other turtle's contribution to the collective good, whether alter (the other turtle) approved of ego (the turtle whose out-link is doing the calculation) and the cost of approval.
      set approval_reinforcer (2 * learning_parameter * satisfaction_approval) / (1 / workteam_size + approvalofothers_value + approval_cost)                                                                                   ;Just as with the satifaction with cooperation, the satifaction with approving is used in a reinforcer function. The formula differs from the formula used for cooperation insofar as the formula for the maximum satisfaction is simplified into it.
      if approval_reinforcer > 1 [set approval_reinforcer 1]
      if approval_reinforcer < -1 [set approval_reinforcer -1]
    ]
  ]
end 

to learn_cooperation
  ask turtles [
    ifelse workstate = 1
    [                                                                                                                                                                                                          ;If the turtle cooperated this iteration...
      ifelse satisfaction_cooperation >= 0
      [set cooperation_propensity (cooperation_propensity + cooperation_reinforcer * (1 - cooperation_propensity) * workstate - cooperation_reinforcer * (1 - cooperation_propensity) * (1 - workstate))]      ; ...and was satisfied with its payoff, the cooperation reinforcer is positive, the first part of this formula is activated, and the propensity to cooperate is updated upward.
      [set cooperation_propensity (cooperation_propensity + cooperation_reinforcer * cooperation_propensity * workstate - cooperation_reinforcer * cooperation_propensity * (1 - workstate))]                  ; ...and was not satisfied with its payoff, the cooperation reinforcer is negative, the first part of the formula is activated but has a negative outcome (+ - = -), and the propensity to cooperate is updated downward.
    ]
    [                                                                                                                                                                                                          ;If the turtle did not cooperate this iteration...
      ifelse satisfaction_cooperation >= 0
      [set cooperation_propensity (cooperation_propensity + cooperation_reinforcer * cooperation_propensity * workstate - cooperation_reinforcer * cooperation_propensity * (1 - workstate))]                  ; ...and was satisfied with its payoff, the cooperation reinforcer is positive, the second part of the formula is activated, and and the propensity to cooperate is updated downward.
      [set cooperation_propensity (cooperation_propensity + cooperation_reinforcer * (1 - cooperation_propensity) * workstate - cooperation_reinforcer * (1 - cooperation_propensity) * (1 - workstate))]      ; ...and was not setisfied with its payoff, the cooperation reinforcer is negative, the second part of the formula is activated and becomes positive through a  double negative (- - = +), and the propensity to cooperate is updated upward.
    ]
  ]
end 

to learn_approval
  ask links [
    ifelse approvalstate = 1
    [                                                                                                                                                                                                     ;If ego did approve of alter this iteration...
      ifelse satisfaction_approval >= 0
      [set approval_propensity (approval_propensity + approval_reinforcer * (1 - approval_propensity) * approvalstate - approval_reinforcer * (1 - approval_propensity) * (1 - approvalstate))]           ; ...and was satisfied with its payoff, the approval reinforcer is positive, the first part of this formula is activated, and the propensity to approve of alter is updated upward.
      [set approval_propensity (approval_propensity + approval_reinforcer * approval_propensity * approvalstate - approval_reinforcer * approval_propensity * (1 - approvalstate))]                       ; ...and was not satisfied with its payoff, the approval reinforcer is negative, the first part og this formula is activated but has a negative outcome (+ - = -), and the propensity to approve of alter is updated downward.
    ]
    [                                                                                                                                                                                                     ;If ego did not approve of alter...
      ifelse satisfaction_approval >= 0
      [set approval_propensity (approval_propensity + approval_reinforcer * approval_propensity * approvalstate - approval_reinforcer * approval_propensity * (1 - approvalstate))]                       ; ...and was satisfied with its payoff, the approval reinforcer is positive, the second part of this formula is activated, and the propensity to approve of alter is updated downward.
      [set approval_propensity (approval_propensity + approval_reinforcer * (1 - approval_propensity) * approvalstate - approval_reinforcer * (1 - approval_propensity) * (1 - approvalstate))]           ; ...and was not satisfiec with its payoff, the approval reinforcer is negative, the second part of this fomula is activated and the propensity to approve of alter is updated upward.
    ]
  ]
end 

to measure-compliant-control
 ask turtles [
    set incoming_approval_propensities sum([approval_propensity] of my-in-links)                                                                                                        ;To calculate compliant control as the correlation between the propensity of others to approve of an actor and the actor's propensity to cooperate, the first step is calculating the sum of others' approval propensities for each turtle.
  ]
  ask turtles [
    set compliancy_numerator (incoming_approval_propensities - mean [incoming_approval_propensities] of turtles) * (cooperation_propensity - mean [cooperation_propensity] of turtles)  ;This approval mass is then used to calculate the numerator of the correlation between approval and cooperation, which consist of the sum of all turtles' products of deviations for approval mass and propensity to cooperate.
    set squared_deviation_approval (incoming_approval_propensities - mean [incoming_approval_propensities] of turtles) ^ 2                                                              ;In order to calculate the first part of the denominator, each turtle calculates the squared deviation of its approvall mass from the mean approval mass. Problem: if every actor approves of every other actor with complete certainty (the self-reinforcing equilibrium show in figure 4 of Flache & Macy, 1996), each actor has N incoming approvals and the deviation becomes zero (whether squared or not). The sum of squares will also be zero. Under this condition, the sum of squares for the approval is multiplied by zero and the denominator of the correlation becomes zero. This becomes a problem when calculating the correlation.
    set squared_deviation_cooperation (cooperation_propensity - mean [cooperation_propensity] of turtles) ^ 2                                                                           ;In order to calculate the second part of the denominator, each turtle calculates the squared deviation of its propensity to cooperate from the mean propensity to cooperate. Under conditions of complete, self-reinforcing coooperation (iff), the problem decribed in the line above could also occur with the propensity to cooperate, because if p = 100 for all turtles and mean(p) = 100 the deviation is zero.
  ]
  if sqrt(sum([squared_deviation_approval] of turtles) * sum([squared_deviation_cooperation] of turtles)) > 1.0E-10 [set compliant_control (sum([compliancy_numerator] of turtles) / sqrt(sum([squared_deviation_approval] of turtles) * sum([squared_deviation_cooperation] of turtles)))] ;Using the squared deviations of expected approval, the squared deviations of cooperation propensities, and the numerator terms calculated by compliancy_numerator, the formula for a correlation is filled in and the compliant control measure is calculated. If the denominator becomes smaller than 1.0E-10, the value for compliant control from last iteration is retained to avoid miscalculations due to finite precision (or the aformentioned division by zero).
end 

to measure-relational-control
  ask links [                                                                                   ;Because relational control is measured using the correlation between the approval propensities of a pair of links (link x y and link y x), the calculation is rather long-winded.
    set in_approval [approval_propensity] of link [who] of end2 [who] of end1                   ;Each link searches the approval propensity of the link that goes the other way.
  ]
  ask links [
    set in_deviation (in_approval - mean([approval_propensity] of links))                       ;The deviation of incoming approval is calculated by comparing a link's incoming approval to the mean propensity to approve. The general mean propensity to approve is used because every outgoing approval propensity is also an incoming approval propensity, which means that the mean incoming propensity to approve is identical to the mean propensity to approve.
    set out_deviation (approval_propensity - mean([approval_propensity] of links))              ;The deviation of outgoing approval is calculated in a similar vein, again using the general mean propensity to approve.
    set deviations_product (in_deviation * out_deviation)                                       ;To calculate the contribution of a link to the numerator term of the correlation, the product of the two deviations is calculated.
    set in_deviation_squared (in_deviation ^ 2)                                                 ;The in_deviation is squared for usage in one of the sums of squares in the denominator...
    set out_deviation_squared (out_deviation ^ 2)                                               ; ...and the same is done for the out_deviation.
  ]
  let relational_numerator sum([deviations_product] of links)                                   ;The numerator term is calculated by summing the turtles' contributions to this value.
  let sum_of_squares_in sum([in_deviation_squared] of links)                                    ;The sum of squares of in_deviations is the first term in the denominator...
  let sum_of_squares_out sum([out_deviation_squared] of links)                                  ; ...and the sum of squares of out_deviationa is the second term.
  if sqrt(sum_of_squares_in * sum_of_squares_out) > 1.0E-10 [set relational_control (relational_numerator / sqrt(sum_of_squares_in * sum_of_squares_out))] ;All terms necessary for the relational control correlation are calculated in advance, in order to make the calculation more transparent. If the denominator is smaller than 1.0E-10, last iteration's calculation is used (again, to avoid miscalculation).
end 

;; Copyright (c) 2020 Siebren Kooistra
;; See Info tab for full copyright and license.

There are 4 versions of this model.

Uploaded by When Description Download
Siebren Kooistra 3 months ago Second attempt to fix info tab encoding Download this version
Siebren Kooistra 3 months ago Attempt to fix info tab encoding Download this version
Siebren Kooistra 4 months ago Added link to suggested reference Download this version
Siebren Kooistra 4 months ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.