Benedito Faustinoni Adrian Ordemann

Simulation models for economics

Project work on

"Affecting mafia with social norms."


The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Oracle's Java site.

Here you can find an introduction to the Affecting mafia with social norms application.

powered by NetLogo

view/download model file: Affecting_mafia_with_social_norms.nlogo


This model intends to simulate the interaction of a mafia-based economy.
Resources spent on the police and social norms by the government will affect the outcome
of black wealth.


The market will grow profit according to the endowment-rate, green patches indicates profit obtainable for storeowners. Red patches have no profit.
Mafious wants to make interactions with storeowners to increase their power. Storeowners will pay them regarding several social factors.
The Police interact with mafious, either the mafia has to pay a bribe, or the police will
help the mafia in controlling the market.


First of all, you should adjust the sliders and the switch according to the state of the world you wish to simulate.
Then press the setup button to create this initial state of the world.
To run the model, and begin all the interactions in the model, press the go-button.
As time goes, you can look at the different monitors to observe money flow, black wealth and the population of the storeowners.

Endowment? decides if there should be growth of profit or not
Endowment-rate decides the growth of profit in the market
Storeowners-multiply decides the limit of profit for a storeowner to give birth to a new storeowner. This can mean that he’s expanding his business.
storeowners-thrust-in-govs-ability-to-fight-mafia gives its own explanation. Changes in public interventions which will affect short-term norms will induce changes in this one.
Police-power captures the governments abilites to fight against the mafia.


The core of the strength of public interventions applied to social norms, is that it’s able to increase the efficiency of the economy, by changing behavior. By changing the slider storeowners-thrust-in-govs-ability-to-fight-mafia for a small amount of time, a benchmark for social norms may be reached so that the government may get long-term
beneficial effects regarding behavior and black wealth, even when the slider storeowners-thrust-in-govs-ability-to-fight-mafia returns to its initial position.


Try to find the benchmarks for making long-term beneficial effects in black wealt by doing some short-term public intervention, by changing storeowners-thrust-in-govs-ability-to-fight-mafia for a short amount of time.


The relationship between the variables could be estimated and implemented in the model to make it more realistic, as a part of the syntax or as a slider according to uncertainty. The interaction between the agents could be more complex, storeowners could affect each other, police could have interacted with the storeowners to check if their business was legal. The public interventions affecting social norms, here through storeowners-thrust-in-govs-ability-to-fight-mafia, could be separated into different types of expenditures in public interventions, norms management, regulations, financial interventions and changing architecture, to make it more suitable for real life. Then the storeowners propensinsity to adapt these norms could be adjusted by a slider, to simulate different network structures and societies.

Related models



globals [endowment]                                                                                

breed [mafious a-mafious]
breed [cops a-cop]
breed [storeowners a-storeowner]
turtles-own [money]
patches-own [countdown]

to setup
  ask patches [set pcolor green]
  if endowment? [ask patches
  [ set countdown random-exponential 360 endowment-return                  
   set pcolor one-of [green red]                                          
set-default-shape mafious "mafious"                                        
create-mafious initial-number-mafious                                      
  set color black
  set size 2
  set money initial-money-mafious                                          
  setxy random-xcor random-ycor                                           

set-default-shape cops "cops"
create-cops initial-number-cops
  set color blue
  set size 2
  set money initial-money-cops
  setxy random-xcor random-ycor

set-default-shape storeowners "storeowner"
create-storeowners initial-number-storeowner
  set color white
  set size 2
  set money initial-money-storeowners
  setxy random-xcor random-ycor]

set endowment count patches with [pcolor = green]                                   

to go
    if not any? turtles [ stop ]                                                 
  ask storeowners [
  ask mafious [
    ask cops [

  if endowment? [ ask patches [ endowment-return ] ]
  set endowment count patches with [pcolor = green]
to move 
  rt random 50
  lt random 50
  fd 1

to take-money  
  if pcolor = green [
    set pcolor red
    set money money + 5

to catch-storeowners
  let mafia-power sum ([money] of mafious in-radius 20) / 100  
  let ProbRefuse-myself sum ([money] of cops in-radius 20) / 100                     
  let prey one-of storeowners-here                   
  if prey != nobody                                                         
  [ask prey [ifelse (((ProbRefuse-myself  * ((storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 ))) < mafia-power )
     [set money money - 3 ask patches in-radius 5 [endowment-return]] [set money money - 1 ask patches in-radius 2 [stop endowment-return]]]]
  ifelse (((ProbRefuse-myself * ((storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 ))) < mafia-power )
   [set money money + 3] [set money money + 0]                   

to catch-mafious
  let payment sum ([money] of mafious-here)                      
  let prey one-of mafious-here                                  
  if prey != nobody
  [ask prey [ifelse (storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 > 0 
      [set money money - (((storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 / 100) * payment)] 
      [set money money + (((storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 / 1000) * payment)]]] 
   ifelse (storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 > 0 
   [set money money + ((storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 / 100) * payment] 
  [set money money + ((storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 / 1000) * payment]                             

to endowment-return                 
  if pcolor = red [                 
    ifelse countdown <= 0                        
    [set pcolor green
      set countdown endowment-rate ]           
   [set countdown countdown - 1 ]             

to death
  if money < 0 [die]                  

to multiply-storeowner
     let mafia-power sum ([money] of mafious in-radius 10) / 1000
    if money > 10 and random-float 100 < storeowners-multiply                                                 
    and ((storeowners-thrust-in-govs-ability-to-fight-mafia * police-power) / 2 / 100) > mafia-power  
    [hatch 1 rt random-float 360 fd 1 
      let ProbRefuse-myself sum ([money] of cops in-radius 10) / 1000] 
  set money (money / 1.5)