NetLogo banner

NetLogo Publications
Contact Us

Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Farsi / Persian


NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled because this model uses external files.)


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 ( and extends it with territoriality and some more features as discussed during GLODERS project meetings.

Whereas an earlier version ( 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.


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).


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

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, 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).


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).


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.


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).


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.


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.


There are three mafia models in the community (,%20edited%202,,%20mafia%20and%20storewoners and which I have not consulted so far.

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]( 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.


The model and some of its first results are documented in

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


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

(back to the NetLogo User Community Models)