Model - Simoscha/FolksInCivilConflicts GitHub Wiki
Map:
maybe:
-
Total number of Policemen: Number of Agents with a total Support greater than 0.75
-
Total number of Mafia-Members: Number of Agents with a total Support lesser than 0.25
Field on the Map: Properties
Jail time(J)
How long a subject stays in prison: While in prison, an agent is removed from the map.
Severety of Hurt (SH)
How severely an agent is hurt: Defines how long it will take to heal: While in hospital, an agent is also removed from the map.
A Person who is in Jail or in Hospital will be stored in a separate hospital or prison array
Range of vision (v)
Number of lattice positions that the agent is able to affect with. The cop can inspect only cells within his vision range. The mafia agent can only act in this range. Probably constant for all agents. At the moment: how many grid-cells in every straight direction (no corners) the agent is able to see,
Probability to get arrested (PP)
PP = (1 - exp(- (IP/IM)))*(1-TS)
IP is influence of Police within v and IM is the influence of the Mafia or Mafiasupporters within v. If there are much more Mafia then Police, the probability to get arrested will decrease. Assumption: The Mean Value ist roughly 1/3
Probability to get hurt (PM)
PM = (1 - exp(-(IM/IP)))*TS
IM is influence of Mafia within v and IP is the total Influence of Policement within v.
Agent: Properties
Prosperity (S0)
Default satisfaction, given by wealth: Property of an agent but at the beginning the arrangement of the agents has to look to it that agents with a similar wealth are in the same area.
Willingness to assume risks (R) (in the Report called Courage)
Assumed Constant (over time) for a specific agent.
Influence on his environment (I)
Assumed Constant (over time) for a specific agent: While an agent is part of the general population his influence doesn't matter much but once he has been recruitet it will define how the general population around him reacts.
Total Support at the Beginning: TS0
Natural inclination of the agent without any outside interference.
General satisfaction (S)
Formula: S(k+1)=S(k)-(exp(-50/J)(PP(k)-PP(k-1))(1-TS) + exp(-50/SH)SH(PM(k)-PM(k-1))*TS)
Range: between zero and one
(if the probability to be arrested or injured has diminished since the last iteration, the satisfaction rises, if it has increased it decreases)
Total Support (TS):
The Support (S) as one value with Range [0,1] where 0 is for example Mafia and 1 Police. Then a completely indifferent person would have S=0.5. Then we say that a person with S<0.25 is seen as "active Mafia member" meaning that he can hurt people as explained below. Analogous a person with S>0.75 ist considered a policeman and can arrest people.
Formula: TS(k+1)=TS(k) - NPexp(-1/2(1-TS)) + NMexp(-1/2TS)
Risk an agent is ready to assume against the police (NP)
NP = (1-TS)R/(SPP*J)
Range: between zero and one
Erwartungswerte: NP,R,S sollten 1/2 sein, von PP 1/3. Somit setzen wir am Anfang mal J=6.
Risk an agent is ready to assume against the Mafia (NM)
NM = TSR/(SPM*SH)
Range: between zero and one
Agent Rules
Movement Rule
For active agents: Move to a random location in the neighbourhood (withing vision) For the general population: Normally go where the influence of Mafia and Police are the smallest but with a chance of roughly 10% make a random move.
Police Rule
Inspect all cells within v and look at a random person: arrest it with the probality PP of this person at this place.
Mafia Rule
Hurt a random agent (police or population) within v with the probability PM of said agent at this place.
Hierarchy: The different agents are sequently moved by a pseudo random pattern. They first move and then arrest or injury if they are active
Population Rule
If the Total support of an agent surpasses 0.75 he will become an active Policeman and can arrest people. If it falls below 0.25 he will become an active Mafia member and start hurting people. In the Simulation we used in the end variable thresholds.
Implementation
- Own Datatype for Agent containing all his properties including where he is standing
- Own Datatype for Field in the map containing all its properties including the agent who is standing upon it (can be an "empty agent").
- Map as a two dimensional Array of Field elements One Dimension of the array signifies the x-coordinate and the other the y-coordinate of the agent stored in dies array-element. Therefore the neighbourhood of an Agent ist just defined through the array elements with similar coordinates.
- Constants defined by a Gauss-Distribution (Normal distribution) with a mean of 0.5 and a standard deviation of 0.12 (empiric value)
- variable properties of agents
- update of the properties after a defined time-unit ( the unit doesn't really matter: just the event-sequence is important)
- Own Array for Agents in Prison or Hospital
Input
- Population Density
- Wealth (Satisfaction) in the Beginning
- Jailtime
- Severity of Injuries
Interesting Output
- Satisfaction of the Population
- Number of active Mafia Members
- Number of active Policemen
- Average total support throughout the population
Implementation of Output
- Array of the output variables at different times (probably not each step: too many information)
- functions which update said array