breed [ villages village ] breed [ shops shop ] breed [ extorters extorter ] breed [ police police-officer ] breed [ public consumer ] globals [ ;; global input parameters not manipulated via the interface max-shop-distance max-customers state-punishment-factor collaboration-probability ;; macro variable which can be accessed by police criminal-records ;; macro output variables confiscated total-money shopping-amount max-family-depth this-family-depth size-of-largest-family time-when-addio-pizzo-takes-over m-ass-a-p-shops m-ass-non-a-p m-ass-ext-act m-ass-ext-jail m-ass-ext-inact WC WO WNPV WP WS WE ;; weights for salience calculation IDW ;; weights for calculating action probability from ;; individual drive and normative drive; IDW = 1 - NDW min-sal max-sal n-sal nonono nonoye noyeno noyeye yenono yenoye yeyeno yeyeye percentage-of-undetected-cases ;; nonono percentage-of-unreported-cases ;; no____ percentage-of-completed-extortions ;; __ye__ percentage-of-cases-with-arrest ;; ____ye percentage-of-cases-with-punishment percentage-of-critical-consumers mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying count-addio-pizzo-shopping count-non-addio-pizzo-shopping addio-pizzo-shopping-percentage ;; global variables only used to signal events of quantities between procedures arrested? ;; is only used to signal this fact between procedures convicted? ;; is only used to signal this fact between procedures extortion-paid ;; is only used to signal this fact punishment-received ;; and the amount between procedures ;; global variables kept only for technical purposes ERROR-OCCURRED? message-id interface-filename logfile-name database-name extortion-database ;; means and standard deviations of norm saliences all-norms all-norm-types all-means all-sds ] ;; the event board common to all agent types (except villages) turtles-own [ last-message-id my-norms my-norm-saliences my-compliances my-violations other-compliances other-violations punishments sanctions explicit-compliance-invocations explicit-violations individual-drive normative-drive ] shops-own [ shop-wealth old-wealth monthly-income addio-pizzo? bankrupt? current-customers date-of-recent-punishment amount-of-recent-punishment my-denunciation-propensity my-pay-extortion-propensity ] extorters-own [ extortion-radius extortion-level punishment-severity extorter-type extortion-now wealth forbidden-shops active? in-jail? was-in-jail? my-ruefulness pentito? time-of-jailing time-of-deactivation reactivation-time my-family role n-of-family-members ] public-own [ my-current-shop distance-to-my-current-shop private-wealth consumption-rate my-addio-pizzo-buy-propensity ] police-own [ my-prosecution-propensity ] patches-own [ ] directed-link-breed [ reports-to-links reports-to-link ] directed-link-breed [ levies-tribute-from-links levies-tribute-from-link ] directed-link-breed [ pay-links pay-link ] directed-link-breed [ threaten-links threaten-link ] pay-links-own [ ] threaten-links-own [ ] ;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Setup Procedures ;; ;;;;;;;;;;;;;;;;;;;;;;; to setup ;; (for this model to work with NetLogo's new plotting features, ;; __clear-all-and-reset-ticks should be replaced with clear-all at ;; the beginning of your setup procedure and reset-ticks at the end ;; of the procedure.) clear-all clear-output ;; set saliences-and-propensities [] set message-id 0 set all-norms ( list "DO-NOT-SHOP-AT-EXTORTION-PAYER" "BUY-FROM-EXTORTION-PAYER" "DENOUNCE-EXTORTION" "DO-NOT-DENOUNCE" "ANXIETY-IS-JUSTIFIED" "TRY-HARD-TO-IMPRISON" "DO-NOT-PAY-EXTORTION" "PAY-EXTORTION-AS-EVERYBODY-DOES" "DO-NOT-BETRAY-COLLEAGUES" "ABJURE-CRIME" ) set all-norm-types ( list "LIBERAL" "TRADITIONAL" "LIBERAL" "TRADITIONAL" "TRADITIONAL" "LIBERAL" "LIBERAL" "TRADITIONAL" "TRADITIONAL" "LIBERAL" ) set all-means n-values length all-norms [ 0 ] set all-sds all-means set max-sal (-1) set min-sal (2) ;; As the next two statements would not work for an applet they are preceded by a semicolon. Remove the semicolon if you want the interface and the database written to files (here and further down, search for "file") ; set interface-filename ( word "result_" rectify-date "_d" ( denunciation-propensity * 100 ) "_p" ( prosecution-propensity * 100 ) ".png" ) ; set database-name ( word "database" rectify-date ".csv" ) set time-when-addio-pizzo-takes-over -1 set ERROR-OCCURRED? false set total-money 0 ;; this is for the version without norms and serves to search the parameter space of this version if batch-version? and not norm-version? [ set constant-random-seed? false set denunciation-propensity random-float-in-range 0.05 0.95 set prosecution-propensity random-float-in-range 0.05 0.95 set extortion-level-low random-float-in-range 10 50 set extortion-level-high random-float-in-range extortion-level-low 75 set punishment-severity-low random-float-in-range 10 50 set punishment-severity-high random-float-in-range punishment-severity-low 75 set ruefulness random-float-in-range 0.0 0.3 set addio-pizzo-threshold random-float-in-range 0.05 0.95 ] ;; these are only for the norm-version, initialisation for searching the parameter space of this model are planned but not yet implemented set WC 0.99 set WO 0.33 set WNPV 0.66 set WP 0.33 set WS 0.99 set WE 0.99 set IDW 1 - NDW ;; this is the same for the version with norms and serve to search the parameter space of this version if batch-version? and norm-version? [ set constant-random-seed? false ;; the following input parameters are initialised randomly for subsequent runs: set NDW random-float-in-range 0.3 0.7 set DISCOUNT random-float-in-range 0.8 1.0 set LOCAL random-float-in-range 2 10 set BACKGROUND random-float-in-range -100 50 set benefit-for-victims random-float-in-range 100 200 set conviction-probability random-float-in-range 0.1 0.8 set extortion-level-low random-float-in-range 10 extortion-level-high set punishment-severity-low random-float-in-range 10 punishment-severity-high ] ;; If set to ON, the random seed has the same value in every run. Here it is set to 4711. if constant-random-seed? [ random-seed 4711 ] set count-addio-pizzo-shopping 0 set count-non-addio-pizzo-shopping 0 create-villages initial-villages [ villages-setup ] setup-patches create-police initial-police [ police-setup ] create-shops initial-shops [ shops-setup ] set m-ass-non-a-p mean [ shop-wealth ] of shops set mean-shop-wealth-non-addio-pizzo mean [ shop-wealth ] of shops with [ not addio-pizzo? and not bankrupt? ] create-extorters initial-extorters [ extorters-setup ] set m-ass-ext-act mean [ wealth ] of extorters create-public initial-public [ public-setup ] set-normative-predispositions set confiscated 0 set shopping-amount initial-wealth set max-customers 2 * initial-public / initial-shops set state-punishment-factor 1.5 set collaboration-probability 0.5 set arrested? false set convicted? false set extortion-paid 0 set extortion-database [] let headline ( list "case-no" "time" "victim" "extorter" "denounced" "successful" "amount-paid" "punishment" "arrested" "convicted") set extortion-database lput headline extortion-database set criminal-records turtle-set nobody set percentage-of-critical-consumers arctan BACKGROUND reset-ticks end ;; setup procedures for the different agent types follow to villages-setup set color one-of [ 15 25 35 45 55 65 76 85 95 105 115 125 135 ] set shape "church" set size 3 move-to one-of patches with [ not any? other turtles-here ] end to public-setup set color white set shape "person" set size 0.5 move-to one-of patches with [ not any? other turtles-here ] set my-current-shop min-one-of shops [ distance myself ] set private-wealth initial-wealth set consumption-rate random-float-in-range consumption-rate-low consumption-rate-high set last-message-id 0 set my-norms ( list "DO-NOT-SHOP-AT-EXTORTION-PAYER" "BUY-FROM-EXTORTION-PAYER") set my-norm-saliences n-values length my-norms [ 0.0 ] set my-compliances n-values length my-norms [ 0 ] set my-violations n-values length my-norms [ 0 ] set other-compliances n-values length my-norms [ 0 ] set other-violations n-values length my-norms [ 0 ] set punishments n-values length my-norms [ 0 ] set sanctions n-values length my-norms [ 0 ] set explicit-compliance-invocations n-values length my-norms [ 0 ] set explicit-violations n-values length my-norms [ 0 ] end to police-setup set color green set shape "police" move-to one-of villages move-to one-of patches in-radius 2 with [not any? other turtles-here] set last-message-id 0 set my-norms ( list "ANXIETY-IS-JUSTIFIED" "TRY-HARD-TO-IMPRISON" ) set my-norm-saliences n-values length my-norms [ 0.0 ] set my-compliances n-values length my-norms [ 0 ] set my-violations n-values length my-norms [ 0 ] set other-compliances n-values length my-norms [ 0 ] set other-violations n-values length my-norms [ 0 ] set punishments n-values length my-norms [ 0 ] set sanctions n-values length my-norms [ 0 ] set explicit-compliance-invocations n-values length my-norms [ 0 ] set explicit-violations n-values length my-norms [ 0 ] end to shops-setup ;; shops procedure set color blue set shape "house" move-to one-of villages move-to one-of patches in-radius ( world-width / sqrt count villages ) with [ not any? other turtles-here ] set addio-pizzo? false set bankrupt? false set shop-wealth random-float-in-range initial-wealth-min initial-wealth-max set old-wealth shop-wealth if not norm-version? [ set my-denunciation-propensity denunciation-propensity ] set last-message-id 0 set my-norms ( list "DENOUNCE-EXTORTION" "DO-NOT-DENOUNCE" "DO-NOT-PAY-EXTORTION" "PAY-EXTORTION-AS-EVERYBODY-DOES" ) set my-norm-saliences n-values length my-norms [ 0.0 ] set my-compliances n-values length my-norms [ 0 ] set my-violations n-values length my-norms [ 0 ] set other-compliances n-values length my-norms [ 0 ] set other-violations n-values length my-norms [ 0 ] set punishments n-values length my-norms [ 0 ] set sanctions n-values length my-norms [ 0 ] set explicit-compliance-invocations n-values length my-norms [ 0 ] set explicit-violations n-values length my-norms [ 0 ] end to extorters-setup set extortion-radius initial-extortion-radius set extorter-type "LL" set extortion-level extortion-level-low if ( random-float 1.0 > 0.5 ) [ set extortion-level extortion-level-high set extorter-type replace-item 0 extorter-type "H" ] set extortion-now extortion-level set punishment-severity punishment-severity-low if ( random-float 1.0 > 0.5 ) [ set punishment-severity punishment-severity-high set extorter-type replace-item 1 extorter-type "H" ] set reactivation-time random-float-in-range reactivation-time-low reactivation-time-high set shape "person" set wealth 2000 set forbidden-shops turtle-set nobody set my-family who set role "*" set active? true set in-jail? false set was-in-jail? false set pentito? false color-extorter move-to one-of villages move-to one-of patches in-radius 3 with [ not any? other turtles-here ] set last-message-id 0 set my-norms ( list "DO-NOT-BETRAY-COLLEAGUES" "ABJURE-CRIME") set my-norm-saliences n-values length my-norms [ 0.0 ] set my-compliances n-values length my-norms [ 0 ] set my-violations n-values length my-norms [ 0 ] set other-compliances n-values length my-norms [ 0 ] set other-violations n-values length my-norms [ 0 ] set punishments n-values length my-norms [ 0 ] set sanctions n-values length my-norms [ 0 ] set explicit-compliance-invocations n-values length my-norms [ 0 ] set explicit-violations n-values length my-norms [ 0 ] set my-ruefulness 0 end to color-extorter set color 45 if extorter-type = "LH" [ set color 25 ] if extorter-type = "HL" [ set color 15 ] if extorter-type = "HH" [ set color 125 ] if pentito? [ set color black set shape "bird" ] end to set-normative-predispositions let LNP BACKGROUND let TNP 10 ifelse LNP < 0 [ set LNP 0 set TNP 0 - BACKGROUND ] [ set TNP 0 ] ask ( turtle-set public shops extorters police ) [ let my-norm-compliance-dispositions [] let my-norm-violation-dispositions [] foreach my-norms [ let np position ? all-norms if item np all-norm-types = "LIBERAL" [ set my-norm-compliance-dispositions lput LNP my-norm-compliance-dispositions set my-norm-violation-dispositions lput TNP my-norm-violation-dispositions ] if item np all-norm-types = "TRADITIONAL" [ set my-norm-compliance-dispositions lput TNP my-norm-compliance-dispositions set my-norm-violation-dispositions lput LNP my-norm-violation-dispositions ] ] set my-compliances my-norm-compliance-dispositions set my-violations my-norm-violation-dispositions set other-compliances my-norm-compliance-dispositions set other-violations my-norm-violation-dispositions set punishments my-norm-violation-dispositions set sanctions my-norm-violation-dispositions set explicit-compliance-invocations my-norm-compliance-dispositions set explicit-violations my-norm-violation-dispositions ] end to setup-patches ask patches [ let nearest-village min-one-of villages [ distance myself ] set pcolor 3 + [ color ] of nearest-village ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Runtime Procedures ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; to go ask shops [ set-shop-variables-for-next-period ] ask public [ go-shopping ] if not batch-version? [ set max-shop-distance max [ distance-to-my-current-shop ] of public ] ask shops [ set monthly-income shop-wealth - old-wealth ] ask extorters [ become-active ] ask shops with [ not bankrupt? ] [ wait-for-extorter ] ask shops with [ shop-wealth <= 0] [ close-down ] ask extorters [ consume ] ;; all money generated by the shops in this period is distributed among consumers set shopping-amount total-money / initial-public set total-money 0 ;; which they now bring to their private accounts ask public [ set private-wealth private-wealth + shopping-amount ] ;; the state compensates victims from its fund of confiscated money compensate ;; extorter hierarchies are analysed report-hierarchies ;; several macro variables are prepared for periodic output prepare-output tick if ticks > maxticks or ERROR-OCCURRED? [ prepare-final-output stop ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; PROCEDURES USED BY ALL TYPES OF AGENTS (EXCEPT VILLAGES) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; all kinds of agents calculate the salience of one norm when they need to make a decision which relates to this norm ;; they use these salience to calculate action propensities to-report propensity-to [ action ] calculate-my-individual-drive-to action calculate-my-normative-drive-to action let a-prop ( IDW * individual-drive + NDW * normative-drive ) report a-prop end to calculate-my-normative-drive-to [ action ] if action = "PAY" [ calculate-a-salience "DO-NOT-PAY-EXTORTION" calculate-a-salience "PAY-EXTORTION-AS-EVERYBODY-DOES" let np-dont position "DO-NOT-PAY-EXTORTION" my-norms let np-do position "PAY-EXTORTION-AS-EVERYBODY-DOES" my-norms let normative-drive-to-pay item np-do my-norm-saliences let normative-drive-not-to-pay item np-dont my-norm-saliences ifelse normative-drive-to-pay > normative-drive-not-to-pay [ set normative-drive normative-drive-to-pay ] [ set normative-drive 1 - normative-drive-not-to-pay ] ] if action = "DENOUNCE" [ calculate-a-salience "DO-NOT-DENOUNCE" calculate-a-salience "DENOUNCE-EXTORTION" let np-dont position "DO-NOT-DENOUNCE" my-norms let np-do position "DENOUNCE-EXTORTION" my-norms let normative-drive-to-denounce item np-do my-norm-saliences let normative-drive-not-to-denounce item np-dont my-norm-saliences ifelse normative-drive-to-denounce > normative-drive-not-to-denounce [ set normative-drive normative-drive-to-denounce ] [ set normative-drive 1 - normative-drive-not-to-denounce ] ] if action = "BECOME PENTITO" [ calculate-a-salience "ABJURE-CRIME" calculate-a-salience "DO-NOT-BETRAY-COLLEAGUES" let np-dont position "DO-NOT-BETRAY-COLLEAGUES" my-norms let np-do position "ABJURE-CRIME" my-norms let normative-drive-to-denounce item np-do my-norm-saliences let normative-drive-not-to-denounce item np-dont my-norm-saliences ifelse normative-drive-to-denounce > normative-drive-not-to-denounce [ set normative-drive normative-drive-to-denounce ] [ set normative-drive 1 - normative-drive-not-to-denounce ] ] if action = "PROSECUTE" [ calculate-a-salience "TRY-HARD-TO-IMPRISON" calculate-a-salience "ANXIETY-IS-JUSTIFIED" let np-dont position "ANXIETY-IS-JUSTIFIED" my-norms let np-do position "TRY-HARD-TO-IMPRISON" my-norms let normative-drive-to-prosecute item np-do my-norm-saliences let normative-drive-not-to-prosecute item np-dont my-norm-saliences ifelse normative-drive-to-prosecute > normative-drive-not-to-prosecute [ set normative-drive normative-drive-to-prosecute ] [ set normative-drive 1 - normative-drive-not-to-prosecute ] ] if action = "SWITCH TO ADDIO-PIZZO SHOP" [ calculate-a-salience "DO-NOT-SHOP-AT-EXTORTION-PAYER" calculate-a-salience "BUY-FROM-EXTORTION-PAYER" let np-dont position "BUY-FROM-EXTORTION-PAYER" my-norms let np-do position "DO-NOT-SHOP-AT-EXTORTION-PAYER"my-norms let normative-drive-to-switch item np-do my-norm-saliences let normative-drive-not-to-switch item np-dont my-norm-saliences ifelse normative-drive-to-switch > normative-drive-not-to-switch [ set normative-drive normative-drive-to-switch ] [ set normative-drive 1 - normative-drive-not-to-switch ] ] end to-report arctan [ argument ] report 1 - ( atan 1 argument ) / 180 end to calculate-my-individual-drive-to [ action ] if action = "PAY" [ let benefit benefit-for-victims let extortion [ extortion-level ] of max-one-of out-pay-link-neighbors [ extortion-level ] let state-punishment extortion * state-punishment-factor let T-pay ( benefit - extortion ) - ( state-punishment * ( 1 - percentage-of-undetected-cases ) ) * ( 1 - collaboration-probability ) let T-no-pay ( extortion - benefit ) - ( ( [ punishment-severity ] of max-one-of out-pay-link-neighbors [ extortion-level ] ) * percentage-of-cases-with-punishment ) let individual-drive-to-pay arctan (0.01 * T-pay ) let individual-drive-not-to-pay arctan ( 0.01 * T-no-pay ) set individual-drive individual-drive-to-pay / ( individual-drive-to-pay + individual-drive-not-to-pay ) ] if action = "DENOUNCE" [ set individual-drive ( 1 - percentage-of-undetected-cases ) * ( percentage-of-cases-with-punishment ) + percentage-of-critical-consumers ] if action = "PROSECUTE" [ set individual-drive 0 ] if action = "BECOME PENTITO" [ set individual-drive percentage-of-cases-with-punishment ] if action = "SWITCH TO ADDIO-PIZZO SHOP" [ set individual-drive 0.5 * [ shop-wealth ] of my-current-shop / mean-shop-wealth-non-addio-pizzo if individual-drive > 1 [ set individual-drive 1.0 ] ] end to calculate-a-salience [ a-norm ] let np position a-norm my-norms let C item np my-compliances let V item np my-violations let OC item np other-compliances let OV item np other-violations let P item np punishments let S item np sanctions let EC item np explicit-compliance-invocations let EV item np explicit-violations let numerator 0 let denominator 0 let OWN 0 if C + V > 0 [ set OWN ( C - V ) / ( C + V ) set numerator numerator + WC set denominator denominator + 2 * WC ] let OBS 0 if OC + OV > 0 [ set OBS ( OC - OV ) / ( OC + OV ) set numerator numerator + WO set denominator denominator + 2 * WO ] let NPV 0 if OV + V > 0 [ set NPV (OV + V - P - S ) if NPV < 0 [ set NPV 0 ] set NPV NPV / ( OV + V) set numerator numerator + WNPV set denominator denominator + WNPV ] let maxPSOV P + S if OV + V > P + S [ set maxPSOV OV + V ] let P_max 0 if maxPSOV > 0 [ set P_max P / maxPSOV set denominator denominator + WP ] let S_max 0 if maxPSOV > 0 [ set S_max S / maxPSOV set denominator denominator + WS ] let ECEV 0 if EC + EV > 0 [ set ECEV ( EC - EV ) / ( EC + EV ) set numerator numerator + WE set denominator denominator + 2 * WE ] let SAL 0 if denominator > 0 [ set SAL ( ( numerator + OWN * WC + OBS * WO - NPV * WNPV + P_max * WP + S_max * WS + ECEV * WE ) / denominator ) ] set my-norm-saliences replace-item np my-norm-saliences SAL set n-sal n-sal + 1 if SAL < min-sal [ set min-sal SAL ] if SAL > max-sal [ set max-sal SAL ] end ;; PROCEDURES USED BY ALL KINDS OF AGENTS (EXCEPT VILLAGES) ;; all kinds of agents update their individual event board to update-compliances [ a-norm ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np my-compliances set my-compliances replace-item np my-compliances ( old-value * DISCOUNT + 1 ) ] ask ( turtle-set shops extorters public police ) in-radius LOCAL [ update-observed-compliances a-norm ] end to update-violations [ a-norm ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np my-violations set my-violations replace-item np my-violations ( old-value * DISCOUNT + 1 ) ] ask ( turtle-set shops extorters public police ) in-radius LOCAL [ update-observed-violations a-norm ] end to update-observed-compliances [ a-norm ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np other-compliances set other-compliances replace-item np other-compliances ( old-value * DISCOUNT + 1 ) ] end to update-observed-violations [ a-norm ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np other-violations set other-violations replace-item np other-violations ( old-value * DISCOUNT + 1 ) ] end to update-punishments [ a-norm depth caller id ] if id = last-message-id [ stop ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np punishments set punishments replace-item np punishments ( old-value * DISCOUNT + 1 ) ] if depth = 0 [ ask ( turtle-set shops extorters public police ) in-radius LOCAL [ if member? a-norm my-norms [ update-punishments a-norm 1 myself message-id update-explicit-compliance-invocations a-norm 1 myself message-id ] ] ] set last-message-id id end to update-sanctions [ a-norm depth caller id ] if id = last-message-id [ stop ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np sanctions set sanctions replace-item np sanctions ( old-value * DISCOUNT + 1 ) ] if depth = 0 [ ask ( turtle-set shops extorters public police ) in-radius LOCAL [ if member? a-norm my-norms [ update-sanctions a-norm 1 myself message-id update-explicit-compliance-invocations a-norm 1 myself message-id ] ] ] set last-message-id id end to update-explicit-compliance-invocations [ a-norm depth caller id ] if id = last-message-id [ stop ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np explicit-compliance-invocations set explicit-compliance-invocations replace-item np explicit-compliance-invocations ( old-value * DISCOUNT + 1 ) ] if depth = 0 [ ask ( turtle-set shops extorters public police ) in-radius LOCAL [ if member? a-norm my-norms [ update-sanctions a-norm 1 myself message-id update-explicit-compliance-invocations a-norm 1 myself message-id ] ] ] set last-message-id id end to update-explicit-violations [ a-norm depth caller id ] if id = last-message-id [ stop ] if member? a-norm my-norms [ let np position a-norm my-norms let old-value item np explicit-violations set explicit-violations replace-item np explicit-violations ( old-value * DISCOUNT + 1 ) ] if depth = 0 [ let addressees ( turtle-set shops extorters public police ) with [ member? a-norm my-norms ] in-radius LOCAL ask addressees [ if member? a-norm my-norms [ update-sanctions a-norm 1 myself message-id update-explicit-violations a-norm 1 myself message-id ] ] ] set last-message-id id end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; PROCEDURES USED BY STATE AND POLICE (STATE IS THE GLOBAL LEVEL) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the state (the observer !!) compensates victims of extortion; the recipient receives invocations ;; of the three norms DO-NOT-PAY-EXTORTION, DENOUNCE-EXTORTION, and PAY-EXTORTION-AS-EVERYBODY-DOES ;; the latter being negative to compensate while [ confiscated > initial-wealth-max and any? shops with [ amount-of-recent-punishment > 0 ] ] [ ask min-one-of ( shops with [ amount-of-recent-punishment > 0 ] ) [ date-of-recent-punishment ] [ set confiscated confiscated - amount-of-recent-punishment set shop-wealth shop-wealth + amount-of-recent-punishment set message-id message-id + 1 update-explicit-compliance-invocations "DO-NOT-PAY-EXTORTION" 0 self message-id update-explicit-compliance-invocations "DENOUNCE-EXTORTION" 0 self message-id update-explicit-violations "PAY-EXTORTION-AS-EVERYBODY-DOES" 0 self message-id update-explicit-violations "DO-NOT-DENOUNCE" 0 self message-id set amount-of-recent-punishment 0 set date-of-recent-punishment ticks + 5 if bankrupt? [ set bankrupt? false if random-float 1.0 < hide-denounce-propensity [ declare-membership-in-addio-pizzo ] ] ] ] end ;; the court (only one, and this one court is also represented by the observer) finds a criminal guilty with ;; a certain probability and sends it to jail for some longer time and, if the criminal had been denounced ;; by the victim, the latter receives a remuneration which is 10 per cent of the money and other assets ;; found with the criminal the other 90 per cent being transferred to compensation fund ;; all police receive invocations of the norm TRY-HARD-TO-IMPRISON to convict [ criminals denouncer ] ask criminals [ update-explicit-compliance-invocations "ABJURE-CRIME" 0 self message-id if random-float 1.0 < conviction-probability [ set in-jail? true ifelse denouncer != nobody [ set confiscated confiscated + wealth * 0.9 let remuneration wealth * 0.1 ask denouncer [ set shop-wealth shop-wealth + remuneration ] ] [ set confiscated confiscated + wealth ] set wealth 0 set color grey set time-of-jailing ticks become-inactive update-compliances "TRY-HARD-TO-IMPRISON" update-violations "ANXIETY-IS-JUSTIFIE" ask police [ update-observed-compliances "TRY-HARD-TO-IMPRISON" ] ask police [ update-observed-violations "ANXIETY-IS-JUSTIFIED" ] set convicted? true ] ifelse norm-version? [ set my-ruefulness propensity-to "BECOME PENTITO" ] [ set my-ruefulness ruefulness ] if random-float 1.0 < my-ruefulness [ become-inactive become-rueful ] ] end ;; police prosecute extorters; the success rate depends on the salience of the norm "TRY-HARD-TO-IMPRISON", ;; and all offenders are prosecuted and in case of success are kept in investigation custody, evenually a court ;; sends them to jail ;; unsuccessful police officers are criticised for having violated the TRY-HARD-TO-IMPRISON norm ;; the other police officers observe such a norm violation ;; in the case of success the opposite holds, of course to prosecute [ offenders denouncer ] set criminal-records ( turtle-set criminal-records offenders ) ifelse norm-version? [ set my-prosecution-propensity propensity-to "PROSECUTE" ] [ set my-prosecution-propensity prosecution-propensity ;; in the non-normative version the success rate is fixed ] ifelse random-float 1.0 < my-prosecution-propensity [ set arrested? true update-compliances "TRY-HARD-TO-IMPRISON" update-violations "ANXIETY-IS-JUSTIFIED" ask police in-radius LOCAL [ update-observed-compliances "TRY-HARD-TO-IMPRISON" update-explicit-violations "ANXIETY-IS-JUSTIFIED" 0 self message-id ] convict offenders denouncer ] [ update-violations "TRY-HARD-TO-IMPRISON" update-compliances "ANXIETY-IS-JUSTIFIED" update-explicit-compliance-invocations "ANXIETY-IS-JUSTIFIED" 0 self message-id ask police in-radius LOCAL [ update-observed-violations "TRY-HARD-TO-IMPRISON" update-observed-compliances "ANXIETY-IS-JUSTIFIED" update-explicit-compliance-invocations "ANXIETY-IS-JUSTIFIED" 0 self message-id ] relieve-from denouncer offenders ;; after the police did not catch the extorter the latter has a chance to punish the victim ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; PROCEDURES USED BY CONSUMERS (THE PUBLIC) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; consumers decide to sanction a shop paying pizzo to switch-to-addio-pizzo-shop set message-id message-id + 1 let my-former-shop my-current-shop ask my-former-shop [ update-sanctions "DO-NOT-PAY-EXTORTION" 0 myself message-id ] ask my-former-shop [ update-explicit-violations "DO-NOT-PAY-EXTORTION" 0 myself message-id ] ask my-former-shop [ update-sanctions "DENOUNCE-EXTORTION" 0 myself message-id ] ask my-former-shop [ update-explicit-violations "DENOUNCE-EXTORTION" 0 myself message-id ] ask public in-radius LOCAL [ update-explicit-compliance-invocations "DO-NOT-SHOP-AT-EXTORTION-PAYER" 0 myself message-id ] ask public in-radius LOCAL [ update-observed-compliances "DO-NOT-SHOP-AT-EXTORTION-PAYER" ] ask public in-radius LOCAL [ update-explicit-violations "BUY-FROM-DENOUNCING-ENTREPRENEUR" 0 myself message-id ] ask public in-radius LOCAL [ update-observed-violations "BUY-FROM-DENOUNCING-ENTREPRENEUR" ] update-compliances "DO-NOT-SHOP-AT-EXTORTION-PAYER" let potential-shops shops with [ addio-pizzo? and not bankrupt? ] if count potential-shops > 0 [ set my-current-shop min-one-of potential-shops [ current-customers ] ] end to support-pizzo-paying-shop set message-id message-id + 1 ask shops in-radius LOCAL [ update-explicit-compliance-invocations "PAY-EXTORTION-AS-EVERYBODY-DOES" 0 self message-id update-explicit-violations "DO-NOT-DENOUNCE" 0 self message-id ] ask public in-radius LOCAL [ update-explicit-violations "DO-NOT-SHOP-AT-EXTORTION-PAYER" 0 self message-id ] update-compliances "BUY-FROM-DENOUNCING-ENTREPRENEUR" ask public in-radius LOCAL [ update-observed-compliances "BUY-FROM-DENOUNCING-ENTREPRENEUR" ] end ;; consumers buy to buy-from [ a-shop ] let my-shopping-amount consumption-rate * shopping-amount ask a-shop [ set shop-wealth shop-wealth + my-shopping-amount ] set private-wealth private-wealth - my-shopping-amount ifelse [ addio-pizzo? ] of a-shop [ set count-addio-pizzo-shopping count-addio-pizzo-shopping + 1 ] [ set count-non-addio-pizzo-shopping count-non-addio-pizzo-shopping + 1 ] end ;; consumers go shopping to go-shopping let my-former-shop my-current-shop if my-current-shop != nobody [ if [ bankrupt? or current-customers > max-customers ] of my-current-shop [ set my-current-shop nobody ] ] if my-current-shop = nobody [ let active-shops shops with [ not bankrupt? ] set my-current-shop min-one-of active-shops [ current-customers ] ] ifelse norm-version? [ ifelse [ addio-pizzo? ] of my-current-shop [ update-violations "BUY-FROM-EXTORTION-PAYER" update-compliances "DO-NOT-SHOP-AT-EXTORTION-PAYER" ] [ update-compliances "BUY-FROM-EXTORTION-PAYER" update-violations "DO-NOT-SHOP-AT-EXTORTION-PAYER" ] set my-addio-pizzo-buy-propensity propensity-to "SWITCH TO ADDIO-PIZZO SHOP" ] [ set my-addio-pizzo-buy-propensity addio-pizzo-threshold ] if [ not addio-pizzo? ] of my-current-shop [ ifelse random-float 1.0 < my-addio-pizzo-buy-propensity [ switch-to-addio-pizzo-shop ] [ support-pizzo-paying-shop ] ] if [ not bankrupt? ] of my-current-shop [ buy-from my-current-shop ] if not batch-version? [ set distance-to-my-current-shop distance my-current-shop set color scale-color black distance-to-my-current-shop max-shop-distance 1 ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; PROCEDURES USED BY SHOPS ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; at the beginning of each period shops set some variables to set-shop-variables-for-next-period set old-wealth shop-wealth set current-customers count public with [ my-current-shop = myself ] end ;; this procedure covers the shop owner's decision making and also reports extortion case ;; even those wich never become known to the police to wait-for-extorter ;; buy supply for inventory and pay salaries let expenses-per-period fixed-cost-per-period + variable-cost-coefficient * monthly-income set shop-wealth shop-wealth - expenses-per-period set total-money total-money + expenses-per-period ;; check whether extortion is requested if count my-out-pay-links > 0 [ ;; an extortion is pending !! all the local variables are only used to add to the extortion database if count my-out-pay-links > 1 [ get-rid-of-other-extorters ] let my-current-extorter one-of out-pay-link-neighbors let this-victim [ who ] of self let this-extorter [ who ] of my-current-extorter let this-denounced "no" let this-successful "no" let this-amount-paid 0 let this-punishment 0 let this-arrested "no" let this-convicted "no" ifelse norm-version? [ set my-denunciation-propensity propensity-to "DENOUNCE" ] [ set my-denunciation-propensity denunciation-propensity ] ifelse ( random-float 1.0 < my-denunciation-propensity ) or addio-pizzo? [ denounce ask police in-radius LOCAL [ update-explicit-compliance-invocations "TRY-HARD-TO-IMPRISON" 0 self message-id] set this-denounced "yes" if arrested? [ set this-arrested "yes" ] set arrested? false if convicted? [ set this-convicted "yes" ] set convicted? false ;; decide-to-pay-or-not ;; paying pizzo when the extorter was denounced should occur only rarely if extortion-paid > 0 [ set this-successful "yes" ] set this-amount-paid extortion-paid set this-punishment punishment-received set extortion-paid 0 set punishment-received 0 ] [ decide-to-pay-or-not ;; only when the shop decided not to denounce] if any? criminal-records [ if member? my-current-extorter criminal-records [ if any? police in-radius vision-range [ ask one-of police in-radius vision-range [ prosecute my-current-extorter myself ] ;; that the victim "asks" a police officer to prosecute has only technical reasons update-violations "DENOUNCE-EXTORTION" update-compliances "DO-NOT-DENOUNCE" update-punishments "DENOUNCE-EXTORTION" 0 self message-id set this-denounced "no" if extortion-paid > 0 [ set this-successful "yes" ] if arrested? [ set this-arrested "yes" ] set arrested? false ] ] ] ] let this-extortion ( list length extortion-database ticks this-victim this-extorter this-denounced this-successful this-amount-paid this-punishment this-arrested this-convicted ) set extortion-database lput this-extortion extortion-database ] end ;; shops decide to resist extortion ;; they know that have violated the PAY-EXTORTION-AS-EVERYBODY-DOES norm ;; the public and the shops receive invocation of the norms DO-NOT-SHOP-AT-EXTORTION-PAYER ;; and DO-NOT-PAY-EXTORTION, respectively to declare-membership-in-addio-pizzo set addio-pizzo? true ask my-links [ die ] set message-id message-id + 1 ask public in-radius LOCAL [ update-sanctions "DO-NOT-SHOP-AT-EXTORTION-PAYER" 0 myself message-id ] ask shops in-radius LOCAL [ update-sanctions "DO-NOT-PAY-EXTORTION" 0 myself message-id ] update-violations "PAY-EXTORTION-AS-EVERYBODY-DOES" set color red end ;; shops denounce an extorter, in the non-norm version only when they have not paid pizzo; but one could think even here of having them denounce even after they have paid pizzo to denounce let nearest-police-officer min-one-of police [ distance myself ] let my-extorters out-pay-link-neighbors ask nearest-police-officer [ prosecute my-extorters myself ] set message-id message-id + 1 update-compliances "DENOUNCE-EXTORTION" update-violations "DO_NOT_DENOUNCE" update-compliances "DO-NOT-PAY-EXTORTION" ask shops in-radius LOCAL [ update-observed-compliances "DENOUNCE-EXTORTION" ] ask shops in-radius LOCAL [ update-observed-violations "DO-NOT-DENOUNCE" ] ask shops in-radius LOCAL [ update-observed-compliances "DO-NOT-PAY-EXTORTION" ] ask police in-radius LOCAL [ update-explicit-compliance-invocations "TRY-HARD-TO-IMPRISON" 0 self message-id ] if not addio-pizzo? and random-float 1.0 < hide-denounce-propensity [ declare-membership-in-addio-pizzo ] end to decide-to-pay-or-not ifelse addio-pizzo? [ ask my-out-pay-links [ die ] ask my-in-threaten-links [ die ] ] ;; addio-pizzo members never pay [ ifelse norm-version? [ set my-pay-extortion-propensity propensity-to "PAY" ifelse ( random-float 1.0 < my-pay-extortion-propensity ) [ pay-extortion set message-id message-id + 1 update-violations "DO-NOT-PAY-EXTORTION" update-compliances "PAY-EXTORTION-AS-EVERYBODY-DOES" ask shops in-radius LOCAL [ update-observed-violations "DO-NOT-PAY-EXTORTION" ] ] [ ask my-out-pay-links [ die ] ask my-in-threaten-links [ die ] update-violations "PAY-EXTORTION-AS-EVERYBODY-DOES" ask shops in-radius LOCAL [ update-observed-violations "PAY-EXTORTION-AS-EVERYBODY-DOES" ] update-compliances "DO-NOT-PAY-EXTORTION" ask shops in-radius LOCAL [ update-observed-violations "DO-NOT-PAY-EXTORTION" ] ] ] ;; in the non-normative version not to denounce means to pay [ pay-extortion ] ] end ;; competing extorters, shops decide to whom to pay; needs update to get-rid-of-other-extorters let my-extorter max-one-of out-pay-link-neighbors [ punishment-severity ] let other-extorters out-pay-link-neighbors while [ count out-pay-link-neighbors > 1 ] [ ask my-extorter [ protect-me-against myself other-extorters ] set other-extorters out-pay-link-neighbors ] end ;; shops pay extortion; they know that they have violated the DO-NOT-PAY-EXTORTION norm and that they have complied ;; with the PAY-EXTORTION-AS-EVERYBODY-DOES norm; the neighbouring shops observe this to pay-extortion if not any? out-pay-link-neighbors [ stop ] let my-extorter max-one-of out-pay-link-neighbors [ punishment-severity ] let extortion-rate [ extortion-now ] of my-extorter let extortion monthly-income * extortion-rate / 100 if extortion > shop-wealth [ set extortion shop-wealth ] set shop-wealth shop-wealth - extortion ask my-extorter [ set wealth wealth + extortion ] update-violations "DO-NOT-PAY-EXTORTION" update-compliances "PAY-EXTORTION-AS-EVERYBODY-DOES" ask shops in-radius LOCAL [ update-observed-violations "DO-NOT-PAY-EXTORTION"] ask shops in-radius LOCAL [ update-observed-compliances "PAY-EXTORTION-AS-EVERYBODY-DOES" ] if count out-pay-link-neighbors > 1 [ let other-extorters out-pay-link-neighbors while [ count out-pay-link-neighbors > 1 ] [ ask my-extorter [ protect-me-against myself other-extorters ] set other-extorters out-pay-link-neighbors ] ] set extortion-paid extortion end ;; a shop which paid pizzo asks the successful extorter to protect it against rivals; a norm invocation needs to be added ;; this norm might be something like NEVER-EXTORT-SHOPS-PROTECTED-BY-ANOTHER-FAMILY, but this is not yet defined to protect-me-against [ protection-seeker rivals ] if not any? other rivals [ stop ] set my-family family if my-family = -1 [ set ERROR-OCCURRED? true stop ] ask other rivals [ give-up protection-seeker subordinate-yourself-to myself ] end ;; a shop is bankrupt and decides to give up; a norm invocation needs to be added to give-up [ your-shop ] ask my-in-pay-links with [ other-end = your-shop ] [ die ] ask my-out-threaten-links with [ other-end = your-shop ] [ die ] set forbidden-shops ( turtle-set forbidden-shops your-shop ) end ;; a shop closes to close-down ask out-pay-link-neighbors [ give-up myself ] set total-money total-money + shop-wealth set shop-wealth 0 set bankrupt? true set color black end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; PROCEDURES USED BY EXTORTERS ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; this procedure collects all activities of an extorter during one period to become-active if active? and not in-jail? [ if count my-in-pay-links = 0 or any? shops with [ count my-in-threaten-links = 0 ] [ if not was-in-jail? [ set extortion-radius extortion-radius-extension * extortion-radius ] find-victims ] ] if active? and not pentito? and wealth <= 0 ;; if an extorter has spent all its money for consumtive purposes it becomes inactive until its family helps it up [ ask out-threaten-link-neighbors [ ask myself [ give-up self ] ] set active? false set color white set total-money total-money + wealth set wealth 0 set time-of-deactivation ticks ] if in-jail? [ if ticks > time-of-jailing + time-in-jail [ set in-jail? false set was-in-jail? true color-extorter set extortion-radius initial-extortion-radius * 0.5 ] ] if not active? and ticks - time-of-deactivation > reactivation-time [ set active? true find-victims color-extorter ] end ;; extorters try to find promising victims to find-victims let allowed-shops shops in-radius extortion-radius with [ not addio-pizzo? and not bankrupt? ] ask forbidden-shops [ set allowed-shops other allowed-shops ] if random-float 1.0 < propensity-to-offend-addio-pizzo and 0 < count shops in-radius extortion-radius with [ addio-pizzo? and not bankrupt? ] [ let selected-anti-pizzo-shop one-of shops in-radius extortion-radius with [ addio-pizzo? and not bankrupt? ] set allowed-shops ( turtle-set selected-anti-pizzo-shop allowed-shops ) ] create-pay-links-from allowed-shops [ set color blue set shape "arc" set hidden? not show-extortion-links? ] create-threaten-links-to allowed-shops [ set color red set shape "arc" set hidden? not show-extortion-links?] if random-float 1.0 < propensity-to-offend-addio-pizzo and count forbidden-shops > 5 [ let my-forbidden-shops turtle-set forbidden-shops ask forbidden-shops with [ addio-pizzo? ] [ set my-forbidden-shops other my-forbidden-shops ] ;; but-first remove-duplicates forbidden-shops set forbidden-shops turtle-set my-forbidden-shops ] end ;; extorters punish shops which have not paid pizzo; the shops know that they violated the PAY-EXTORTION-AS-EVERYBODY-DOES, other shops observe this ;; and that a shop complied with the DO-NOT-PAY-EXTORTION norm ;; the punishment is public, thus the offender's name is inserted into the criminal records to punish [ victim ] let punishment [ shop-wealth ] of victim * punishment-severity / 100 ask victim [ if count out-pay-link-neighbors > 1 [ get-rid-of-other-extorters ] set shop-wealth shop-wealth - punishment set date-of-recent-punishment ticks update-violations "PAY-EXTORTION-AS-EVERYBODY-DOES" ask shops in-radius LOCAL [ update-observed-compliances "DO-NOT-PAY-EXTORTION"] ask shops in-radius LOCAL [ update-observed-violations "PAY-EXTORTION-AS-EVERYBODY-DOES" ] ask victim [ ask one-of police in-radius vision-range [ prosecute out-pay-link-neighbors myself ] ] set amount-of-recent-punishment punishment set punishment-received punishment ] set wealth wealth + punishment set criminal-records ( turtle-set criminal-records myself ) end ;; extorters punish a shop which has denounced after police was not successful; the norm invocation are done in the punish procedure to relieve-from [ victim offenders ] ask offenders [ punish victim ] end ;; an extorter spends its money once per period to consume if active? and not in-jail? [ let c consumption-per-period if c > wealth [ set c wealth ] set wealth wealth - c set total-money total-money + c ] end ;; for different reasons an extorter can become inactive (no money left, put to jail, pentito) to become-inactive ask my-out-threaten-links [ die ] ask my-in-pay-links [ die ] end ;; an extorter decides to denounce colleagues (becomes a "pentito") to become-rueful let my-accomplices ( turtle-set in-reports-to-link-neighbors in-levies-tribute-from-link-neighbors ) if not any? my-accomplices [ stop ] ;; isolated extorters never become pentiti set criminal-records ( turtle-set criminal-records my-accomplices ) ask my-accomplices [ update-explicit-compliance-invocations "ABJURE-CRIME" 0 self message-id ] ask my-accomplices [ update-observed-violations "DO-NOT-BETRAY-COLLEAGUES" ] set reactivation-time maxticks ;; this extorter will not become active again during this simulation run ;; now the pentito cuts all links to his neigbours in the family tree let my-boss one-of in-levies-tribute-from-link-neighbors let my-followers in-reports-to-link-neighbors ;; and gives up all current extortions ask my-in-pay-links [ die ] ask my-out-threaten-links [ die ] ask my-in-links [ die ] ask my-out-links [ die ] ask my-followers [ ask my-out-reports-to-links with [ other-end = myself ] [ die ] if my-boss != nobody [ create-reports-to-link-to my-boss [ set color 52 set shape "my-arc" ] create-levies-tribute-from-link-from my-boss [ set color 25 set shape "my-arc" ] ] ] if my-boss != nobody [ ask my-boss [ ask my-out-levies-tribute-from-links with [ other-end = myself ] [ die ] create-levies-tribute-from-links-to my-followers [ set color 25 set shape "my-arc" ] ] ] if not batch-version? [ output-print " " output-print ( list who " leaves family " my-family ", boss was " my-boss ) ifelse any? my-followers [ output-print ( list who "'s followers " [ who ] of my-followers " cut their links to " who ) ] [ output-print ( list who " had no followers" ) ] ifelse my-boss != nobody [ output-print ( list [ who ] of my-boss " cut its links to " who ) ] [ output-print ( list who " had no followers" ) ] ifelse any? my-followers and my-boss != nobody [ output-print ( list [ who ] of my-followers " created links to " [ who ] of my-boss ) output-print ( list [ who ] of my-boss " created links to " [ who ] of my-followers ) ] [ output-print ( list " no consequences" ) ] ] set pentito? true set color black set shape "bird" right 90 set my-family -1 end ;; an extorter joins a famliy when competitor turned out to be more powerful to subordinate-yourself-to [ boss ] let boss-family 0 set my-family family ask boss [ set boss-family family ] if role = "*" and my-family != [ my-family ] of boss [ create-reports-to-link-to boss [ set color 52 set shape "my-arc"] create-levies-tribute-from-link-from boss [ set color 25 set shape "my-arc" ] ifelse count in-reports-to-link-neighbors = 0 [ set role "-" ][ set role "+" ] ] end ;;;;;;;;;;;;;; ;; ;; Utilities ;; ;;;;;;;;;;;;;; ;; extorters from hierarchies, here is how they are displayed to report-sub-hierarchies [ indentation ] ifelse count in-reports-to-link-neighbors = 0 [ ] [ let followers in-reports-to-link-neighbors output-type indentation output-print [ who ] of followers set indentation word indentation "..." set this-family-depth this-family-depth + 1 ask followers [ if not batch-version? [ output-type indentation output-type who output-print role ] report-sub-hierarchies indentation ] ] end ;; two recursive functions organising the redistribution of resources within a family to collect-from-subordinates if count in-reports-to-link-neighbors = 0 [ stop ] let accrual 0 ask in-reports-to-link-neighbors [ collect-from-subordinates let payment wealth * solidarity set wealth wealth - payment set accrual accrual + payment ] set wealth wealth + accrual end to distribute-to-subordinates if count in-reports-to-link-neighbors = 0 [ stop ] let accrual 0 let n-of-subordinates count in-reports-to-link-neighbors if n-of-subordinates > 0 [ let my-wealth wealth ask in-reports-to-link-neighbors [ distribute-to-subordinates let payment my-wealth * solidarity / n-of-subordinates set wealth wealth + payment set accrual accrual - payment ] ] set wealth wealth + accrual end ;; this procedure serves two purposes: to document the family hierarchy and to redistribute money between the members of each family to report-hierarchies let top-positions extorters with [ ( count out-reports-to-link-neighbors = 0 ) and ( count in-reports-to-link-neighbors > 0 ) ] if not batch-version? [ output-print word "Current families at the end of period " ticks output-type "top-positions: " ifelse any? top-positions [ output-print [ who ] of top-positions ] [ output-print "no top positions" ] ] let indentation "..." set this-family-depth 0 set max-family-depth 0 set size-of-largest-family 0 ask top-positions [ let accrual 0 ask in-reports-to-link-neighbors [ collect-from-subordinates let payment wealth * solidarity set wealth wealth - payment set accrual accrual + payment ] set wealth wealth + accrual ] ask top-positions [ let accrual 0 let n-of-subordinates count in-reports-to-link-neighbors if n-of-subordinates > 0 [ let my-wealth wealth ask in-reports-to-link-neighbors [ distribute-to-subordinates let payment my-wealth * solidarity / n-of-subordinates set wealth wealth + payment set accrual accrual - payment ] set wealth wealth + accrual ] ] ask top-positions [ if not batch-version? [ output-type indentation output-type who output-print role ] report-sub-hierarchies indentation ] ask extorters [ ifelse role = "*" [ set size 2 set n-of-family-members count extorters with [ family = [ my-family ] of myself ] if size-of-largest-family < n-of-family-members [ set size-of-largest-family n-of-family-members ] ] [ set size 1 ] if count out-reports-to-link-neighbors > 1 [ show family show ( list "ERROR: in " [ who ] of in-reports-to-link-neighbors ) show ( list "ERROR: out " [ who ] of out-reports-to-link-neighbors ) set ERROR-OCCURRED? true ] ] if this-family-depth > max-family-depth [ set max-family-depth this-family-depth ] end ;; reports to which family an extorter belongs to-report family let result -1 if count out-reports-to-link-neighbors > 1 [ set ERROR-OCCURRED? true show ( list "ERROR: family " [ who ] of out-reports-to-link-neighbors ) ask out-reports-to-link-neighbors [ show ( list "ERROR: family " [ who ] of out-reports-to-link-neighbors ) ] report result ] ifelse count out-reports-to-link-neighbors = 0 [ set result who ] [ let boss one-of out-reports-to-link-neighbors ask boss [ set result family ] ] report result end to prepare-output ifelse count shops with [ not addio-pizzo? and not bankrupt?] > 0 [ set m-ass-non-a-p mean ( [ shop-wealth ] of shops with [ not addio-pizzo? and not bankrupt? ] ) ] [ set m-ass-non-a-p 0 ] ifelse count shops with [ addio-pizzo? and not bankrupt? ] > 0 [ set m-ass-a-p-shops mean ( [ shop-wealth ] of shops with [ addio-pizzo? and not bankrupt? ] ) ] [ set m-ass-a-p-shops 0 ] if time-when-addio-pizzo-takes-over < 0 [ if m-ass-a-p-shops > m-ass-non-a-p [ set time-when-addio-pizzo-takes-over ticks ] ] ifelse count extorters with [ active? ] > 0 [ set m-ass-ext-act mean [ wealth ] of extorters with [ active? ] ] [ set m-ass-ext-act 0 ] ifelse count extorters with [ in-jail? ] > 0 [ set m-ass-ext-jail mean [ wealth ] of extorters with [ in-jail? ] ] [ set m-ass-ext-jail 0 ] ifelse count extorters with [ not active? ] > 0 [ set m-ass-ext-inact mean [ wealth ] of extorters with [ not active? ] ] [ set m-ass-ext-inact 0 ] ;; the following counts take only the past length-moving-average (or less) periods into account let length-moving-average maxticks * 2 / 3 set nonono length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "no" and item 5 ? = "no" and item 8 ? = "no" ] but-first extortion-database set nonoye length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "no" and item 5 ? = "no" and item 8 ? = "yes" ] but-first extortion-database set noyeno length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "no" and item 5 ? = "yes" and item 8 ? = "no" ] but-first extortion-database set noyeye length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "no" and item 5 ? = "yes" and item 8 ? = "yes" ] but-first extortion-database set yenono length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "yes" and item 5 ? = "no" and item 8 ? = "no" ] but-first extortion-database set yenoye length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "yes" and item 5 ? = "no" and item 8 ? = "yes" ] but-first extortion-database set yeyeno length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "yes" and item 5 ? = "yes" and item 8 ? = "no" ] but-first extortion-database set yeyeye length filter [ ticks - ( item 1 ? ) < length-moving-average and item 4 ? = "yes" and item 5 ? = "yes" and item 8 ? = "yes" ] but-first extortion-database let n-extortions length filter [ ticks - ( item 1 ? ) < length-moving-average ] but-first extortion-database if n-extortions > 0 [ set percentage-of-undetected-cases nonono / n-extortions ;; nonono set percentage-of-unreported-cases ( nonono + nonoye + noyeno + noyeye ) / n-extortions ;; no____ set percentage-of-completed-extortions ( noyeno + noyeye + yeyeno + yeyeye ) / n-extortions ;; __ye__ set percentage-of-cases-with-arrest ( nonoye + noyeye + yenoye + yeyeye ) / n-extortions ;; ____ye set percentage-of-cases-with-punishment length filter [ ticks - ( item 1 ? ) < length-moving-average and item 7 ? > 0 ] but-first extortion-database / n-extortions ] set percentage-of-critical-consumers mean [ my-addio-pizzo-buy-propensity ] of public end to prepare-final-output let all-n n-values length all-norms [ 0 ] let all-sum all-n let all-sqsum all-n ask ( turtle-set extorters public police shops ) [ foreach all-norms [ let this-norm ? let np 0 if member? this-norm my-norms [ set np position this-norm all-norms let old-value item np all-n set all-n replace-item np all-n ( 1 + old-value ) set old-value item np all-sum let my-np position this-norm my-norms let new-value item my-np my-norm-saliences set all-sum replace-item np all-sum ( new-value + old-value ) set old-value item np all-sqsum set all-sqsum replace-item np all-sqsum ( new-value * new-value + old-value ) ] ] ] foreach all-norms [ let np position ? all-norms let this-n item np all-n if this-n > 0 [ set all-means replace-item np all-means ( ( item np all-sum ) / this-n ) set all-sds replace-item np all-sds ( ( item np all-sqsum ) / this-n - ( item np all-means ) * ( item np all-means ) ) ] ] ifelse count shops with [ addio-pizzo? and not bankrupt? ] > 0 [ set mean-shop-wealth-addio-pizzo mean [ shop-wealth ] of shops with [ addio-pizzo? and not bankrupt? ] ] [ set mean-shop-wealth-addio-pizzo -1 ] ifelse count shops with [ not addio-pizzo? and not bankrupt? ] > 0 [ set mean-shop-wealth-non-addio-pizzo mean [ shop-wealth ] of shops with [ not addio-pizzo? and not bankrupt? ] ] [ set mean-shop-wealth-non-addio-pizzo -1 ] set n-families count extorters with [ role = "*" and count out-levies-tribute-from-link-neighbors > 0 ] set n-shops-non-addio-pizzo count shops with [ not addio-pizzo? and not bankrupt? ] set n-shops-addio-pizzo count shops with [ addio-pizzo? and not bankrupt? ] set n-shops-still-paying count shops with [ count my-out-pay-links > 0 ] set all-means map [ word ? "," ] all-means set all-sds map [ word ? "," ] all-sds set addio-pizzo-shopping-percentage count-addio-pizzo-shopping / ( count-addio-pizzo-shopping + count-non-addio-pizzo-shopping ) ;; As the following would not work in applets the following lines are preceded with a semicolon. Remove it if you want the interface and/ore database output ; if export-interface? and behaviorspace-run-number = 0 ; [ ; export-interface interface-filename ; show word "interface exported to " interface-filename ; ] ; file-close ; if not batch-version? ; [ ; file-open database-name ; foreach extortion-database ; [ ; file-type item 0 ? ;; event ; file-type ";" ; file-type item 1 ? ;; time ; file-type ";" ; file-type item 2 ? ;; victim ; file-type ";" ; file-type item 3 ? ;; extorter ; file-type ";" ; file-type item 4 ? ;; denounced? ; file-type ";" ; file-type item 5 ? ;; completed? ; file-type ";" ; file-type item 6 ? ;; payment ; file-type ";" ; file-type item 7 ? ;; punishment ; file-type ";" ; file-type item 8 ? ;; arrested? ; file-type ";" ; file-print item 9 ? ;; convicted? ; ] ; file-close ; show word "extortion database exported to " database-name ; ] stop end to-report random-float-in-range [ low high ] report low + random-float ( high - low ) end to-report sqr [ x ] report x * x end to-report rectify-date let date-string date-and-time let colon position ":" date-string set date-string replace-item colon date-string "-" set colon position ":" date-string set date-string replace-item colon date-string "-" set colon position "." date-string set date-string replace-item colon date-string "-" let year substring date-string 23 27 let month substring date-string 19 22 if month = "Okt" [ set month "Oct" ] if month = "Dez" [ set month "Dec" ] if month = "Mär" [ set month "Mar" ] if month = "Mai" [ set month "May" ] let day substring date-string 16 18 let AMPM substring date-string 13 15 let hour substring date-string 0 2 let minsec substring date-string 2 12 let month-number ( 1 + ( position month ( list "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec" ) ) ) ifelse month-number < 10 [ set month ( word "0" month-number ) ] [ set month ( word month-number ) ] let num-hour read-from-string hour if AMPM = "PM" [ set hour ( word ( num-hour + 12 ) ) ] set date-string ( word year "-" month "-" day " " hour minsec ) report date-string end @#$#@#$#@ GRAPHICS-WINDOW 380 15 870 526 -1 -1 8.0 1 8 1 1 1 0 0 0 1 0 59 0 59 1 1 1 ticks 30.0 BUTTON 10 10 90 50 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 100 10 190 50 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 200 10 290 50 go once go NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 10 70 190 103 initial-shops initial-shops 0 500 50 50 1 NIL HORIZONTAL SWITCH 10 790 197 823 constant-random-seed? constant-random-seed? 1 1 -1000 TEXTBOX 20 685 80 703 World 11 0.0 1 SLIDER 5 295 160 328 extortion-level-low extortion-level-low 0 50 12.5 2.5 1 % HORIZONTAL TEXTBOX 25 55 175 73 Shops' parameters: 11 0.0 1 SLIDER 210 70 375 103 initial-wealth-min initial-wealth-min 0 50000 50000 1000 1 NIL HORIZONTAL SLIDER 210 105 375 138 initial-wealth-max initial-wealth-max 0 100000 50000 1000 1 NIL HORIZONTAL TEXTBOX 25 470 175 488 Police's parameters: 11 0.0 1 SLIDER 5 490 180 523 initial-police initial-police 0 100 10 5 1 NIL HORIZONTAL SLIDER 5 530 180 563 time-in-jail time-in-jail 0 30 6 3 1 NIL HORIZONTAL PLOT 1305 435 1480 585 Mean assets of extorters NIL NIL 0.0 10.0 0.0 200000.0 false true "" "" PENS "active" 1.0 0 -955883 true "" "plot m-ass-ext-act" "in jail" 1.0 0 -13210332 true "" "plot m-ass-ext-jail" "inactive" 1.0 0 -16777216 true "" "plot m-ass-ext-inact" PLOT 1100 435 1305 585 Mean assets of targets NIL NIL 0.0 10.0 0.0 10.0 true true "" "" PENS "pizzo payers" 1.0 0 -13345367 true "" "plot m-ass-non-a-p" "addio-pizzo" 1.0 0 -2674135 true "" "plot m-ass-a-p-shops" SLIDER 5 225 160 258 initial-extorters initial-extorters 0 300 20 10 1 NIL HORIZONTAL SLIDER 175 295 370 328 punishment-severity-high punishment-severity-high 0 80 30 10 1 % HORIZONTAL SLIDER 5 330 160 363 extortion-level-high extortion-level-high 0 80 40 2.5 1 % HORIZONTAL SLIDER 175 330 370 363 punishment-severity-low punishment-severity-low 0 60 30 5 1 % HORIZONTAL SLIDER 175 225 370 258 initial-extortion-radius initial-extortion-radius 0 10 2 1 1 NIL HORIZONTAL SLIDER 175 260 370 293 extortion-radius-extension extortion-radius-extension 1 2 1.1 0.1 1 NIL HORIZONTAL SLIDER 5 260 160 293 consumption-per-period consumption-per-period 0 2000 300 50 1 NIL HORIZONTAL SLIDER 210 180 375 213 denunciation-propensity denunciation-propensity 0 1 0.4 0.05 1 NIL HORIZONTAL SLIDER 5 650 175 683 prosecution-propensity prosecution-propensity 0 1 0.35 0.05 1 NIL HORIZONTAL TEXTBOX 10 210 160 228 Extorters' parameters 11 0.0 1 SLIDER 5 700 160 733 initial-villages initial-villages 5 50 30 5 1 NIL HORIZONTAL PLOT 1305 585 1480 735 Number of extorters NIL NIL 0.0 10.0 0.0 10.0 true true "" "" PENS "inactive" 1.0 0 -4539718 true "" "plot count extorters with [ not active? ]" "in jail" 1.0 0 -13210332 true "" "plot count extorters with [ in-jail? ]" "active" 1.0 0 -2674135 true "" "plot count extorters with [ active? and not in-jail? ]" "pentito" 1.0 0 -11221820 true "" "plot count extorters with [ pentito? ]" SLIDER 185 490 365 523 initial-public initial-public 0 4800 800 200 1 NIL HORIZONTAL TEXTBOX 190 470 340 488 Consumers' parameters 11 0.0 1 SLIDER 185 650 365 683 addio-pizzo-threshold addio-pizzo-threshold 0 1 0.45 0.05 1 NIL HORIZONTAL SWITCH 170 735 325 768 show-extortion-links? show-extortion-links? 0 1 -1000 OUTPUT 1480 585 1780 830 8 PLOT 1100 585 1305 735 Families NIL NIL 0.0 10.0 0.0 10.0 true true "" "" PENS "number" 1.0 0 -16777216 true "" "plot count extorters with [ role = \"*\" and count out-levies-tribute-from-link-neighbors > 0 ]" "max depth" 1.0 0 -8630108 true "" "plot max-family-depth" "max size" 1.0 0 -5825686 true "" "plot size-of-largest-family" "isolated" 1.0 0 -7500403 true "" "plot count extorters with [ ( count my-in-levies-tribute-from-links = 0 ) and active? and not in-jail? ]" PLOT 1480 435 1780 585 Current distribution of assets NIL NIL 0.0 10.0 0.0 10.0 true true "" "" PENS "addio-pizzo" 1.0 0 -2674135 true "" "plot sum [ shop-wealth ] of shops with [ addio-pizzo? and not bankrupt? ]" "pizzo payers" 1.0 0 -13345367 true "" "plot sum [ shop-wealth ] of shops with [ not addio-pizzo? and not bankrupt? ]" "active extorters" 1.0 0 -955883 true "" "plot sum [ wealth ] of extorters with [ active? and not in-jail? ]" "inactive extorters" 1.0 0 -11221820 true "" "plot sum [ wealth ] of extorters with [ not active? and not in-jail? ]" "confiscated" 1.0 0 -16777216 true "" "plot confiscated" "private" 1.0 0 -13840069 true "" "plot sum [ private-wealth ] of public" MONITOR 380 535 500 580 remaining addio-pizzo count shops with [ not bankrupt? and addio-pizzo? ] 17 1 11 MONITOR 500 535 625 580 remaining pizzo payers count shops with [ not addio-pizzo? and not bankrupt? ] 17 1 11 MONITOR 380 625 500 670 failed addio-pizzo count shops with [ addio-pizzo? and bankrupt? ] 17 1 11 MONITOR 500 625 625 670 failed pizzo payers count shops with [ not addio-pizzo? and bankrupt? ] 17 1 11 MONITOR 630 535 732 580 active extorters count extorters with [ active? ] 17 1 11 MONITOR 735 535 875 580 extorters in jail count extorters with [ in-jail? ] 17 1 11 MONITOR 630 580 732 625 retired extorters count extorters with [ not active? ] 17 1 11 MONITOR 735 580 875 625 extorters previously in jail count extorters with [ was-in-jail? ] 17 1 11 SLIDER 175 365 370 398 propensity-to-offend-addio-pizzo propensity-to-offend-addio-pizzo 0 1 0 0.1 1 NIL HORIZONTAL SLIDER 5 365 160 398 reactivation-time-low reactivation-time-low 0 20 5 1 1 NIL HORIZONTAL MONITOR 380 580 500 625 currently paying count shops with [ addio-pizzo? and count my-out-pay-links > 0 ] 17 1 11 MONITOR 500 580 625 625 currently paying count shops with [ not addio-pizzo? and count my-out-pay-links > 0 ] 17 1 11 SLIDER 5 400 160 433 reactivation-time-high reactivation-time-high 0 20 10 1 1 NIL HORIZONTAL MONITOR 380 680 460 725 total wealth sum [ wealth ] of extorters + sum [ shop-wealth ] of shops + confiscated + total-money + sum [ private-wealth ] of public 2 1 11 MONITOR 470 680 567 725 wealth of shops sum [ shop-wealth ] of shops 2 1 11 MONITOR 570 680 655 725 wealth of extorters sum [ wealth ] of extorters 2 1 11 MONITOR 660 680 720 725 confiscated confiscated 2 1 11 SLIDER 10 105 190 138 fixed-cost-per-period fixed-cost-per-period 0 500 300 100 1 NIL HORIZONTAL PLOT 895 435 1100 585 Number of shops NIL NIL 0.0 10.0 0.0 10.0 true true "" "" PENS "pizzo-payers" 1.0 0 -13345367 true "" "plot count shops with [ not addio-pizzo? and not bankrupt? ]" "addio-pizzo" 1.0 0 -2674135 true "" "plot count shops with [ addio-pizzo? and not bankrupt? ]" "failed shops" 1.0 0 -7500403 true "" "plot count shops with [ bankrupt? ]" SLIDER 185 530 365 563 initial-wealth initial-wealth 0 1000 200 50 1 NIL HORIZONTAL SLIDER 10 140 192 173 variable-cost-coefficient variable-cost-coefficient 0 1 0.9 0.1 1 NIL HORIZONTAL MONITOR 730 680 780 725 private sum [ private-wealth ] of public 17 1 11 SLIDER 185 565 365 598 consumption-rate-low consumption-rate-low 0.0 1 0.9 0.1 1 NIL HORIZONTAL SLIDER 185 600 365 633 consumption-rate-high consumption-rate-high 0.0 1 1 0.1 1 NIL HORIZONTAL SWITCH 200 790 325 823 batch-version? batch-version? 1 1 -1000 SWITCH 170 700 325 733 export-interface? export-interface? 1 1 -1000 SWITCH 360 790 485 823 norm-version? norm-version? 0 1 -1000 SLIDER 515 760 687 793 DISCOUNT DISCOUNT 0 1 0.9 0.1 1 NIL HORIZONTAL SLIDER 695 760 867 793 LOCAL LOCAL 0 20 8 1 1 NIL HORIZONTAL SLIDER 515 790 687 823 NDW NDW 0 1 0.55 0.05 1 NIL HORIZONTAL MONITOR 1125 765 1257 810 Messages exchanged message-id 17 1 11 PLOT 1140 60 1300 180 DO NOT PAY EXTORTION NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05\nset-plot-y-range 0 initial-shops" "" PENS "default" 1.0 0 -16777216 true "" "histogram [ item 2 my-norm-saliences ] of shops" PLOT 980 60 1140 180 DENOUNCE NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 0.05 1 -16777216 true "" "histogram [ item 0 my-norm-saliences ] of shops" MONITOR 965 765 1120 810 n-sal min-sal max-sal ( list n-sal precision min-sal 3 precision max-sal 3 ) 17 1 11 PLOT 1300 60 1460 180 DO NOT SHOP AT EXTORTION PAYER NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 0 -1 true "" "histogram [ item 0 my-norm-saliences ] of public" PLOT 1140 180 1300 300 PAY EXTORTION AS EVERYBODY DOES NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 0 -16777216 true "" "histogram [ item 3 my-norm-saliences ] of shops" PLOT 1620 60 1780 180 TRY HARD TO IMPRISON NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 0 -16777216 true "" "histogram [ item 1 my-norm-saliences ] of police" TEXTBOX 370 765 520 783 Norm oriented version\n 11 0.0 1 TEXTBOX 15 190 205 208 irrelevant in the norm version 11 125.0 1 TEXTBOX 95 635 295 653 irrelevant in the norm version 11 125.0 1 SLIDER 5 565 177 598 vision-range vision-range 0 100 100 10 1 NIL HORIZONTAL SLIDER 5 735 160 768 maxticks maxticks 0 100 100 5 1 NIL HORIZONTAL SLIDER 5 600 177 633 conviction-probability conviction-probability 0 1 0.340175125979706 0.05 1 NIL HORIZONTAL PLOT 895 585 1100 735 Extortion types per cent NIL NIL 0.0 1.0 0.0 1.0 true true "" "" PENS "undetected" 1.0 0 -16777216 true "" "plot percentage-of-undetected-cases" "undenounced" 1.0 0 -7500403 true "" "plot percentage-of-unreported-cases" "completed" 1.0 0 -955883 true "" "plot percentage-of-completed-extortions" "arrested" 1.0 0 -13210332 true "" "plot percentage-of-cases-with-arrest" "punished" 1.0 0 -2674135 true "" "plot percentage-of-cases-with-punishment" SLIDER 175 435 370 468 ruefulness ruefulness 0 1 0.1 0.05 1 NIL HORIZONTAL SLIDER 5 435 160 468 solidarity solidarity 0 1 0.35 0.05 1 NIL HORIZONTAL SLIDER 695 790 867 823 BACKGROUND BACKGROUND -100 100 -70 10 1 NIL HORIZONTAL PLOT 980 300 1140 420 denunciation NIL NIL 0.0 1.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 0.05 1 -16777216 true "" "histogram [ my-denunciation-propensity ] of shops" PLOT 1140 300 1300 420 pay extortion NIL NIL 0.0 1.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 1 -16777216 true "" "histogram [ my-pay-extortion-propensity ] of shops" PLOT 1620 300 1780 420 prosecute NIL NIL 0.0 1.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 1 -16777216 true "" "histogram [ my-prosecution-propensity ] of police" PLOT 1300 300 1460 420 buy from addio-pizzo NIL NIL 0.0 1.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 1 -1 true "" "histogram [ my-addio-pizzo-buy-propensity ] of public" SLIDER 175 400 370 433 benefit-for-victims benefit-for-victims 0 200 180 5 1 % HORIZONTAL PLOT 980 180 1140 300 DO NOT DENOUNCE NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05\nset-plot-y-range 0 initial-shops" "" PENS "default" 1.0 0 -16777216 true "" "histogram [ item 1 my-norm-saliences ] of shops" SLIDER 210 140 375 173 hide-denounce-propensity hide-denounce-propensity 0 1 0.2 0.05 1 NIL HORIZONTAL TEXTBOX 1025 10 1320 28 Action related saliences and propensities 11 0.0 1 TEXTBOX 1005 40 1155 58 denounce 11 0.0 1 TEXTBOX 1155 40 1305 58 pay extortion 11 0.0 1 TEXTBOX 1315 40 1465 58 select addio-pizzo shop 11 0.0 1 TEXTBOX 1650 40 1800 58 prosecute 11 0.0 1 TEXTBOX 890 100 1040 126 salience\ncivic norm 11 0.0 1 TEXTBOX 890 225 1040 251 salience\ntraditional norm 11 0.0 1 TEXTBOX 890 335 975 375 action propensity 11 0.0 1 PLOT 1460 60 1620 180 ABJURE CRIME NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 0 -1 true "" "histogram [ item 1 my-norm-saliences ] of extorters" TEXTBOX 1475 40 1625 58 become pentito 11 0.0 1 PLOT 1460 180 1620 300 DO NOT BETRAY NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 0 -1 true "" "histogram [ item 0 my-norm-saliences ] of extorters" PLOT 1460 300 1620 420 become pentito NIL NIL 0.0 1.0 0.0 10.0 true false "" "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" PENS "default" 1.0 0 -1 true "" "histogram [ my-ruefulness ] of extorters" PLOT 1620 180 1780 300 ANXIETY IS JUSTIFIED NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 0 -16777216 true "" "histogram [ item 0 my-norm-saliences ] of police" PLOT 1300 180 1460 300 BUY FROM DENOUNCING ENTREPRENEUR NIL NIL 0.0 10.0 0.0 10.0 true false "set-plot-pen-mode 1\nset-plot-x-range 0.0 1.05\nset-plot-pen-color black\nset-plot-pen-interval 0.05" "" PENS "default" 1.0 0 -16777216 true "" "histogram [ item 1 my-norm-saliences ] of public" @#$#@#$#@ ## WHAT IS IT? This model is an attempt at modelling the behaviour of extorters, their victims and police in the context of the GLODERS project. It uses some but not all of the features described by Luis Gustavo Nardin, Giulia Andrighetto, Rosaria Conte, Mario Paolucci in their IntERS model (http://www.gloders.eu/images/Deliverables/GLODERS_D3-1.pdf) and extends it with territoriality and some more features as discussed during GLODERS project meetings. Whereas an earlier version (http://ccl.northwestern.edu/netlogo/models/community/ARDERS) was mainly devoted to analyse the systemic effects of the behaviour of the agents, whose decision making processes are only modelled rather crudely, this version includes the registration of events by most groups of agents, the identification of these events as relevant for one of the norms which partly govern the agent behaviour as well as the calculation of the salience of these norms for future actions of the agents. This salience is converted into a propensity to take an action by either abiding by the respective norm or violating it. ## HOW IT WORKS The world contains several villages (shape: church) in which several enterprises (shape: house) exist which can fall victim to extortion. Extorters (shape: person) can approach their targets first in their immediate vicinity, if they do not find any more potential victims in their immediate vicinity they extend this vicinity. **Normative board** In the norm version, agents of all types have a normative board, in which norms are represented, and a mechanism with which they can remember events and norm invocations, and they can calculate the salience of the respective norms as a means to decide which of their possible actions they will apply in a given situation. This works as follows: * Events such as denunciation, paying extortion, shopping and so on trigger messages to agents in the neighbourhood. If an event is related to more than one norm, several messages are broadcast by the agent which triggered the event. Each of these messages contains a reference to a norm (usually the norm or norms which is or are followed or violated by the action). A recipient of such a message updates those of its memory entries which refer to the specified norm according to whether the action is performed by itself or by another agent and whether the message contains a punishment or a sanction. This is implemented in a series of `update-` procedures (the `update-` procedures combine the invocation and the updates). * When an agent has to choose between different action options (including the option of doing nothing) it calculates a probability (`calculate-propensity-from` for actions controlled by only one norm, and `propensity-to` for actions controlled by two conflicting norms) for each of the action options which in turn depends on a rationally calculated "individual drive" (implemented in the procedure `calculate-my-individual-drive-to` with respect to the action named as the procedure's argument) and a "normative drive" which is calculated from the salience of the norm or norms involved in the action option. The salience of the norm, in turn, is calculated according to a complicated formula (implemented in the procedure `calculate-my-normative-drive-to`) which combines the memory of * cases when this agent abided by the respective norm or violated it, * cases when this agent observed norm compliances and violations in its neighbourhood, * cases when this agent received punishments or sanctions and * cases when this agent heard about, applied or personally received invocations of the respective norm. * When an action is related to more than one norm (as is the case with events when pizzo is paid --- as this violates the `DO-NOT-PAY-EXTORTION` norm and at the same time complies with the `PAY-EXTORTION-AS-EVERYBODY-DOES` norm, the decision considers only the one with the higher salience. **Shops** serve for providing the population with goods and services of any type. To keep things simple, these goods and services are not detailed. Shops receive payment from their customers and bear the fixed and variable costs of their business by paying into a funds which is evenly distributed to the population which is considered to provide the shops with the necessary supply (both in goods and sevrices) --- to keep things simple here, too, the households of the population receive an equal share of the overall period income of the shops, as if all of them served as suppliers and workers for the shops equally. Shops are often approached by criminals for "pizzo" which they can refuse at the risk of being severely punished. They can avoid this with a certain propensity to call the police (`denunciation-propensity`), denouncing the extorters and having them prosecuted. When a shop decides to denounce an extorter it joins an "addio-pizzo" movement and makes this fact known to everybody (and to the modeller by changing its colour from blue to red). When a shop decides not to denounce and the extorter (only if it is listed in the criminal records) is observed by the police, the victim collaborates as a witness (not as a denouncer), the extorter is prosecuted and the victim is punished for not not denouncing (it receives both a norm violation and a punishment message with respect to the `DENOUNCE-EXTORTION` norm). In case shops are approached by more than one extorter at the same time --- this happens mainly in the initial phase and represents what might have happened when mafia-like organisations first came into being --- the shops decide whom to pay to, and the successful extorter will then protect the shop against the rivalling extorters. When due to extortion and punishment the asset of a shop falls below zero, it is closed and does not participate in the trading process until it is compensated from a funds filled by the confiscated wealth of the extorters. In the norm version, shops know about three norms, `DENOUNCE-EXTORTION`, `DO-NOT-PAY-EXTORTION` and `PAY-EXTORTION-AS-EVERYBODY-DOES`. **Consumers** choose a shop for purchasing their goods. They have a certain propensity `addio-pizzo-threshold` to choose shops belonging to the "addio-pizzo" movement. If their current shop is closed, they choose another, preferably belonging to the "addio-pizzo" movement and preferably having only a small number of customers (the reason for this is two-fold: they want to avoid crowded shops, and shops with only few customers should get a chance to prosper). In the norm version, consumers know about two norms, `DO-NOT-SHOP-AT-EXTORTION-PAYER` and `DENOUNCE-EXTORTION` (but these are not yet completely implemented, perhaps as it is difficult for consumers to observe an extortion which they could denounce). **Extorters** start their career as individual criminals and approach the nearest reachable shop, asking for a "pizzo" which is a certain proportion (either `extortion-level-LOW` or `extortion-level-HIGH` depending on the type the extorter belongs to) of its revenue per period. When the shop refuses and the police fails to successfully prosecute the extorter, the latter punishes the shop, taking away a certain proportion of all its assets (either `punishment-severity-LOW` or `punishment-severity-HIGH`, again depending on the type the extorter belongs to). It is understood that all assets of a shop are easily convertible into money, there are no physical assets which could be destroyed. Punishment becomes public, even when the victim does not officially denounce the extorter, the name of the extorter is added to the criminal records, and this extorter is now under observation. If the police hinders the extorter from punishing, the extorter is kept in investigation custody such that it cannot act any longer during the current period. If it is convicted it is brought to jail for a certain number of periods, and all its assets are confiscated and transferred into a funds from which in turn punished shops can be compensated (following a first come--first served principle). If several extorters approach the same shop at the same time, one of them is selected by the shop to protect the shop against rivalling extorters, and the latter subordinate to the former, forming a family and eventually a hierarchy, for instance in case the successful extorter is already subordinate to someone else; if any rivalling extorters already belong to families, the family hierarchy is not changed. In the norm version, extorters know about two norms, `DO-NOT-BETRAY-COLLEAGUES` and `ABJURE-CRIME` (but these are not yet implemented). At the end of each period extorters embedded in a family structure pay a tribute of `solidarity * wealth` to their respective leaders, and these leaders in turn distribute equal shares of their `wealth * solidarity` to their followers. Extorters can collaborate with the police (become "pentiti") with a certain probability (`ruefulness`) in the phase when they are in investigation custody. This propensity is currently exogenous, but in a future version it will be controlled by the two norms `DO-NOT-BETRAY-COLLEAGUES` and `ABJURE-CRIME` mentioned above. If they decide to behave this way they become inactive forever and denounce their neighbours in the network whose names are then added to the criminal records. Pentiti are removed from the family tree and do no longer participate in the redistribution of wealth within their former family. **Police** try to prosecute a denounced extorter and are successful with a certain probability (`my-prosecution-propensity`) which in the norm version depends on their earlier experience. Moreover they keep criminal records for all extorter agents which ever were denounced in the past. If such an extorter which has a criminal record comes into the range of vision of police, it is also prosecuted. Arrested extorters cannot continue their activities during the current tick (they are in investigative custody). In the norm version they know about two norms, `ANXIETY-IS-JUSTIFIED` and `TRY-HARD-TO-IMPRISON` (but these are not yet, or eventually poorly, implemented). Beside the police which try to arrest extorters found by denunciation or observation there is also a court which can condemn an extorter found guilty. In this case they spend a longer time in jail (but this is not yet, or eventually poorly, implemented: extorters only stay in investigation custody until the end of the period and are never convicted --- it will be empirically interesting to find out under which conditions courts convict extorters and which norms they follow). ## HOW TO USE IT Set the `initial-...` sliders before pressing `setup`. This determines the numbers of the different breeds in the world. There is currently no guarantee that arbitrary combinations of the `initial-...` sliders yield reasonable results. The same applies to the sliders which determine wealth and income. Press `setup` to populate the world with all these agents. As usual, `go` will run the simulation continuously, while `go once` will run one tick. The `constant-random-seed?` switch allows to run the model with the same random seed for different parameter combinations. If it is set OFF, every run starts with a new random seed. If the `debug?` choser is on, output will be written to the file logfile.txt. Each new run is preceded with the date and time of the start of the run unless the file is deleted. NOT TO BE USED in the applet version! The red and blue extortion links can be switched off with the `show-extortion-links?` switch. The two groups of plots show what their headlines suggest. The block in the upper right corner contains histograms of norm saliences and of action propensities, the block in the lower right corder contains numbers of shops and extorters for different categories and amounts of wealth these possess.The percentages of different extortion outcomes is also plotted as an average of the past 10 cycles. The last of these moving averages can also be output in the behaviour space version such that it can be analysed as If the `batch-version?` choser is on and the `norm-version?` slider is off, the sliders for `extortion-level-...`, `punishment-severity-...`, `prosecution-propensity`, `denunciation-propensity` and `addio-pizzo-threshold` have no effect. Instead random values are assigned to these variables. This choser should only be set on in the BehaviorSpace mode. If the `norm-version?` switch is off, the model behaves more or less exactly like the former version http://ccl.northwestern.edu/netlogo/models/community/ARDERS. If both `batch-version?`and `norm-version?`switches are on, multiple runs with the same combination of all relevant paremeters can be executed. In a future version, there will also be a random setting for the parameters which are relevant for the norm version. For the norm version the sliders `addio-pizzo-threshold` and `denunciation-propensity` do not take any effect as these two propensities are calculated endogenously and separately for each shop and consumer, respectively. The same applies to the `prosecution-propensity` slider, as the propensity of a police officer to prosecute also depends on the individual drive and the normative drive calculated from the salience of the two respective norms. The calculation consists of two steps: the individual drive of shops to denounce and/or to pay is determined by the risk of being extorted compared to the benefit of being protected by the successful extorter. The latter is currently and exogenous variable (`benefit-for-victims`). The individual drive of other kinds of agents is still a constant set to zero. The normative drive depends on former experience with an agent's own actions and on observations made of normative behaviour of other agents' in the neighbourhood (see http://www.gloders.eu/images/Deliverables/GLODERS_D3-1.pdf, pp. 33-39). For the norm version the following sliders control global variables: * `LOCAL` determines the distance within which events can be observed * `NDW` is the weight of the normative drive for calculating the decision probability, the sum of the two weights for individual drive and normative drive is 1.0 * `DISCOUNT` determines the weight of older memory contents (whenever a new event arrives, the number of all previous events is multiplied by `DISCOUNT` before 1 is added for the current event; thus with `DISCOUNT = 1.0` all events have the same weight inependent of their age. * The standard initialisation of the memory of all agents with 0 could be unrealistic as it does not take account of the fact that any snapshot of the real world would start with real actors whose memory is not empty but filled with remembered compliances and violations of norms and past punishments and sanctions. This is why the slider `BACKGROUND` offers the possibility to initialise the agents according either to the standard (empty memories: `BACKGROUND = 0`) or to a "civic" scheme which is intolerant to extortion rackets (`0 < BACKGROUND < 100`) or to a "traditional" scheme which is tolerant to extortion rackets (`-100 < BACKGROUND < 0`), where the absolute amount of `BACKGROUND` denotes how intensive the "civic" or "traditional" scheme is. A CSV file can be written (except in the batch version) in which every extortion case is documented much like in the Palermo database (but still with less information). As this would not work for applets, the respective code is a comment (search for "file" and remove the semicolons to make the code active). ## THINGS TO NOTICE Target enterprises have an initial wealth uniformly distributed between the numbers on the respective min and max sliders, the income of a shop depends on the number of customers currently choosing it. Extorters have two different extortion levels and two different severity levels (as in Nardin et al.) and a consumption per period which is currently fixed for all extorters at the same level. The difference between extortion and punishment severity levels can, of course, be suppressed by setting the sliders to the same value. Extortion is a proportion (`extortion-level`) of the income per period, punishment for not paying is a proportion (`punishment-severity`) of the total wealth of the target. Often the local hierarchies agglomerate to one unique hierarchy. The model keeps an extortion database of all attempted or successful extortion cases with information on whether the extorters were denounced, observed, prosecuted or condemned. (Not for the batch version, and in this version the respective code must be made active by removing the semicolons in all respective lines.) The model calculates the main parameters of the norm salience distributions (mean and standard deviation). ## THINGS TO DISCUSS The formula for calculating salience could be simplified. As weighting coefficients are multiples of 0.33 one could replace them with the respective multiples of 1.0 and change the `numerator` and the `denominator` accordingly. The formula is claimed in Deliverable 3.1 to have been extracted from Cialdini, R. B., Kallgren, C. A., Reno, R. R. (1990). A focus theory of normative conduct: A theoretical refinement and reevaluation of the role of norms in human behavior. Advances in Experimental Social Psychology. 24: 201–234. But it seems that only the terms used in this formula were extracted from this source (which does not say anything about the weights). "DO-NOT-PAY-EXTORTION" and "PAY-EXTORTION-AS-EVERYBODY-DOES" are not just the two sides of a coin but two norms which are in conflict. As the effects of these norms exclude each other (extortion is either paid or not paid) it is necessary to discuss how the probability of paying is calculated. The simple version would be to assume that every violation of one of the two morms is a compliance with the other. But then sanctions and punishments of the two norms cannot be separated. Burning down the shop is certainly a punishment for a violation of the "PAY-EXTORTION-AS-EVERYBODY-DOES" norm, but what is it in terms of the "DO-NOT-PAY-EXTORTION" norm? This model introduces norms relevant for the police and the extorter agents which have never been discussed among the GLODERS teams. Obviously, their behaviour, too, will be controlled by norms in the real world, and hence the model should include norms for these agent types, too. Without having implemented anything reasonable about them, the model contains two norms for each of them (see above). Not all norm invocations have been implemented yet, perhaps some norm-related messages have been forgotten. They will be inserted in future versions. ## THINGS TO TRY The model can be used to find out which of the input parameters guiding the behaviour of the various kinds of agents have the greatest impact on the various output parameters (see Troitzsch 2014). It goes without saying that the model, although inspired by results of empirical research into individual behaviour done within the GLODERS project, has not yet been validated with respect to its output variables, thus it cannot be used to guide policy making, but it gives hints at which empirical macro variables to analyse. The output generated by the model in a CSV file can be used to perform similar analyses as those made with the empirical data in the siciliy and Calabria database (629 cases of extortion which became known to the police and the courts, see the papers cited below). ## EXTENDING THE MODEL The model could be extended by endowing the agents with even more learning capabilities. Particularly extorters could then optimise their behaviour as a reaction on punishment and sanctions. And certainly the relations between the public and the shops could be modelled in more detail, e.g. by having individual consumers work for one shop and purchase different kinds of goods from several different shops. ## NETLOGO FEATURES Nothing special. The code uses recursive functions to determine to which family an extorter belongs and to write up the hierarchy in the output window. ## RELATED MODELS There are three mafia models in the community (http://ccl.northwestern.edu/netlogo/models/community/Siste%20Mafia33,%20edited%202, http://ccl.northwestern.edu/netlogo/models/community/The%20Mafia%20Model%20-%20Interaction%20between%20police,%20mafia%20and%20storewoners and http://ccl.northwestern.edu/netlogo/models/community/When%20Mafias%20and%20States%20Cohabitate) which I have not consulted so far. ## CREDITS AND REFERENCES The research leading to these results has received funding from the European Union Seventh Framework Programme (FP7/2007--2013) under grant agreement no. 315874 ([Global dynamics of extortion racket systems, GLODERS](http://www.gloders.eu)). These results reflect only the author’s views, and the European Union is not liable for any use that may be made of the information contained therein. The author thanks his colleagues in this and earlier projects for fruitful discussions over many years. The model owes a lot to the Nardin et al. discussion paper and to the discussions within the GLODERS project. The GLODERS project will use this model as a proof of concept and a quick and dirty prototype of the final GLODERS simulator. ## HOW TO CITE The model and some of its first results are documented in http://www.gloders.eu/images/Deliverables/GLODERS_D2-3.pdf Klaus G. Troitzsch (2015) Extortion Racket Systems as Targets for Agent-Based Simulation Models. Comparing Competing Simulation Models and Emprical Data. Submitted to Advances in Complex Systems ## COPYRIGHT NOTICE Written by Klaus G. Troitzsch 2013-2015. The model may be used and extended if the source is quoted and a note is sent to kgt@uni-koblenz.de @#$#@#$#@ default true 0 Polygon -7500403 true true 150 0 60 270 150 225 240 270 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 bird false 0 Polygon -7500403 true true 135 165 90 270 120 300 180 300 210 270 165 165 Rectangle -7500403 true true 120 105 180 237 Polygon -7500403 true true 135 105 120 75 105 45 121 6 167 8 207 25 257 46 180 75 165 105 Circle -16777216 true false 128 21 42 Polygon -7500403 true true 163 116 194 92 212 86 230 86 250 90 265 98 279 111 290 126 296 143 298 158 298 166 296 183 286 204 272 219 259 227 235 240 241 223 250 207 251 192 245 180 232 168 216 162 200 162 186 166 175 173 171 180 Polygon -7500403 true true 137 116 106 92 88 86 70 86 50 90 35 98 21 111 10 126 4 143 2 158 2 166 4 183 14 204 28 219 41 227 65 240 59 223 50 207 49 192 55 180 68 168 84 162 100 162 114 166 125 173 129 180 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 church false 0 Polygon -7500403 true true 105 15 75 285 105 285 135 285 Rectangle -7500403 true true 120 180 225 285 Rectangle -7500403 true true 120 180 225 285 Rectangle -7500403 true true 120 180 225 285 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 police false 0 Circle -7500403 false true 45 45 210 Polygon -7500403 true true 96 225 150 60 206 224 63 120 236 120 Polygon -7500403 true true 120 120 195 120 180 180 180 185 113 183 Polygon -7500403 false true 30 15 0 45 15 60 30 90 30 105 15 165 3 209 3 225 15 255 60 270 75 270 99 256 105 270 120 285 150 300 180 285 195 270 203 256 240 270 255 270 285 255 294 225 294 210 285 165 270 105 270 90 285 60 300 45 270 15 225 30 210 30 150 15 90 30 75 30 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 top-down-triangle false 0 Polygon -7500403 true true 150 270 285 45 15 45 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 5.1.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go background LOCAL DISCOUNT mean [ shop-wealth ] of shops with [ addio-pizzo? and not bankrupt? ] mean [ shop-wealth ] of shops with [ not addio-pizzo? and not bankrupt? ] count extorters with [ role = "*" and count out-levies-tribute-from-link-neighbors > 0 ] count shops with [ not addio-pizzo? and not bankrupt? ] count shops with [ addio-pizzo? and not bankrupt? ] count shops with [ count my-out-pay-links > 0 ] nonono nonoye noyeno noyeye yenono yenoye yeyeno yeyeye ticks all-means all-sds "##" setup go background LOCAL DISCOUNT NDW ruefulness benefit-for-victims conviction-probability extortion-level-low punishment-severity-low mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying percentage-of-undetected-cases percentage-of-unreported-cases percentage-of-completed-extortions percentage-of-cases-with-arrest percentage-of-cases-with-punishment percentage-of-critical-consumers ticks all-means all-sds "##" setup go denunciation-propensity prosecution-propensity addio-pizzo-threshold background LOCAL DISCOUNT NDW ruefulness benefit-for-victims conviction-probability extortion-level-low punishment-severity-low mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying addio-pizzo-shopping-percentage percentage-of-undetected-cases percentage-of-unreported-cases percentage-of-completed-extortions percentage-of-cases-with-arrest percentage-of-cases-with-punishment percentage-of-critical-consumers ticks all-means all-sds "##" setup go denunciation-propensity prosecution-propensity addio-pizzo-threshold background LOCAL DISCOUNT NDW ruefulness benefit-for-victims conviction-probability extortion-level-low punishment-severity-low mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying addio-pizzo-shopping-percentage percentage-of-undetected-cases percentage-of-unreported-cases percentage-of-completed-extortions percentage-of-cases-with-arrest percentage-of-cases-with-punishment percentage-of-critical-consumers ticks all-means all-sds "##" setup go denunciation-propensity prosecution-propensity addio-pizzo-threshold background LOCAL DISCOUNT NDW ruefulness benefit-for-victims conviction-probability extortion-level-low punishment-severity-low mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying addio-pizzo-shopping-percentage percentage-of-undetected-cases percentage-of-unreported-cases percentage-of-completed-extortions percentage-of-cases-with-arrest percentage-of-cases-with-punishment percentage-of-critical-consumers ticks all-means all-sds "##" setup go denunciation-propensity prosecution-propensity addio-pizzo-threshold background LOCAL DISCOUNT NDW ruefulness benefit-for-victims conviction-probability extortion-level-low punishment-severity-low mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying addio-pizzo-shopping-percentage percentage-of-undetected-cases percentage-of-unreported-cases percentage-of-completed-extortions percentage-of-cases-with-arrest percentage-of-cases-with-punishment percentage-of-critical-consumers ticks all-means all-sds "##" setup go denunciation-propensity prosecution-propensity addio-pizzo-threshold background LOCAL DISCOUNT NDW ruefulness benefit-for-victims conviction-probability extortion-level-low punishment-severity-low mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying addio-pizzo-shopping-percentage percentage-of-undetected-cases percentage-of-unreported-cases percentage-of-completed-extortions percentage-of-cases-with-arrest percentage-of-cases-with-punishment percentage-of-critical-consumers ticks all-means all-sds "##" setup go denunciation-propensity prosecution-propensity addio-pizzo-threshold background LOCAL DISCOUNT NDW ruefulness benefit-for-victims conviction-probability extortion-level-low punishment-severity-low mean-shop-wealth-addio-pizzo mean-shop-wealth-non-addio-pizzo n-families n-shops-non-addio-pizzo n-shops-addio-pizzo n-shops-still-paying addio-pizzo-shopping-percentage percentage-of-undetected-cases percentage-of-unreported-cases percentage-of-completed-extortions percentage-of-cases-with-arrest percentage-of-cases-with-punishment percentage-of-critical-consumers ticks all-means all-sds "##" @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 arc 0.5 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 my-arc 1.0 -0.2 1 4.0 4.0 0.0 1 1.0 0.0 0.2 1 4.0 4.0 link direction true 0 Polygon -7500403 true true 150 150 120 195 180 195 150 150 @#$#@#$#@ 1 @#$#@#$#@