Improved Wheeler's CT Model

No preview image

1 collaborator

Default-person Yicheng Shen (Author)

Tags

casualty 

Tagged by Yicheng Shen over 3 years ago

collateral damage 

Tagged by Yicheng Shen over 3 years ago

collateral damage) 

Tagged by Yicheng Shen over 3 years ago

insurgency 

Tagged by Yicheng Shen over 3 years ago

wargame 

Tagged by Yicheng Shen over 3 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 213 times • Downloaded 33 times • Run 0 times
Download the 'Improved Wheeler's CT Model' modelDownload this modelEmbed this model

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


ACKNOWLEDGMENT

This is model based on Dr. Wheeler's paper "It pays to be popular: A study of civilian assistance and guerilla warfare" in 2005 and Dr. Bennett's paper titled Governments, civilians, and the evolution of insurgency: Modeling the early dynamics of insurgencies in 2008.

WHAT IS IT?

This is improvement of Dr. Wheeler's model (see my other work for basic version). I first rebuilt the essential parts of this classic Netlogo model ​​from scratch, and explored new features of the simulations in order to unravel deeper relationships of various parties involved in the counter-insurgency operations, such as civilians, insurgents and soldiers.

HOW IT WORKS

Simulations are conducted on a two-dimensional 50 by 50 unit board. Each grid, or patch, is designated as containing either urban construction or vegetation. 120 grids with lowest density are urban areas colored in black, and the rest are green grasslands with vegetation density ranging from 1000 to 9000. The smoothing of terrains follows Wheeler’s design and is repeated a total of three times. In addition, the smoothing algorithm allows urban grids to usually form in clusters, representing settlements and villages of various sizes.

There are three factions of agents modeled, including white local civilian populace, red insurgents and blue soldiers or peacekeepers. Each group has its own breed and should follow a set of movement / engagement rules. Their initial numbers spawned could also be adjusted.

Movements:

Civilian’s rules: There are two movement modes associated with civilians, determined by whether they have any knowledge of a known insurgent threat. At the beginning, each civilian will walk towards a random direction at each tick. If the heading patch has a density higher than 5000, the civilian will turn back and adjust to a new random heading. Therefore, civilians should have a natural tendency to stay in cities and areas with low vegetation density. If an insurgent is presented within three units, the civilian’s status will become “panic” for the next 20 ticks. During this time, this agent will be colored yellow and run towards the nearest soldier until the panic countdown reduces to zero. That nearby insurgent will also be detected for the same amount of time.

Insurgent’s rules: Insurgents start by moving to the grid with the highest density in the radius of 20 patches. They will keep hiding unless being detected. Insurgents have a good vision of spotting unalerted soldiers in the radius of 8 and ambush them. When detected, they move away from the spotter and find another high-density patch nearby to hide.

Soldier’s rules: Soldiers are spawned at the center of the map. They also have two modes of movements. When they are unalerted of any threat, soldiers move randomly and patrol together as small teams to ensure their safety. There are several conditions that can trigger their alertness: they see any panicked civilian in radius of 10; there are insurgents present in radius of 3; any teammate in the same group is alerted; any teammate is ambushed by insurgents. Once alerted, soldiers will move towards the source of the threat, the detected insurgents, and eliminate the threat before returning to patrol duty.

Engagements:

There are two types of engagements in this model. Every fight results in casualty and the outcomes of engagements are calculated by simple probabilistic formulas. Insurgents ambush soldiers: When insurgents ambush unalerted soldiers, they have a 70% chance of causing a soldier casualty and a 30% chance of being killed by returning fire. Insurgents cannot ambush alerted soldiers nearby.

Soldiers fight insurgents: Alerted soldiers would gather towards detected insurgents. When they arrive, there is an 80% chance that the threat is eliminated (the insurgent is either killed or captured), and 20% chance that a soldier is killed. If the latter happens, nearby soldiers would engage the insurgent again until the threat is dealt with.

The movement and engagements overall can be complicated to understand at a first glance. Therefore the flowcharts in Figure 1 are present as a useful visualization to help clarify the settings. Moreover, the model allows the users to choose a “reinforcement” option: if yes, a group of ten soldiers would be spawned at the center when current soldiers in the field are fewer than five. This represents a dynamic in which the military or peacekeeping forces have enough manpower in the region to eventually overwhelm any insurgency.

While Wheeler’s model already has encompassed many essential characteristics of the counter-insurgency operations, there is some room for improvement. The second part of the project examines adjustments that better represent the civilian and soldier activities. Motivated by Bennett’s modeling of the early dynamics of insurgencies (2008), my adjustments first allow more diversity in engagement outcomes and civilian behaviors. During each type of engagements mentioned above, soldiers now have “accuracy” and “effectiveness” traits: accuracy controls the probability that soldiers cause any collateral damage, in this case it would be one civilian death; effectiveness measures the probability that soldiers eliminate the targeted insurgent in each engagement. These two parameters together allow much more diversified engagement outcomes and bring civilians into the engagement.

Civilians now have a new trait named “anger” to measure the overall attitude towards the soldiers. Civilian casualty is the main way of provoking anger. When engaging with an insurgent target, soldiers may cause collateral damage by hurting nearby civilians. Patrolling soldiers could also misfire towards civilians in sight. The probability of such misfires is determined by both the accuracy parameter and the density of their locations.

If the anger level reaches 10, one civilian will turn into an uncooperative protester at every tick. Protesters, colored pink, do not inform or communicate with soldiers. If the anger level exceeds 20, one civilian will turn into an insurgent at every tick, and follow all insurgent movement and engagement rules. All transformations are irreversible. The anger level will also decrease by 0.05 units per tick as long as it is positive, reflecting the gradual easement of sentiments. This parameter adds more volatile civilian behaviors and directly reflects the impacts of soldiers’ accuracy and effectiveness in combat.

Moreover, the new model sets a threshold for subsequent soldier reinforcements so that the higher command would not send in more troops into the region if the forces have already sustained high casualties. By default, the threshold is set as two times the initial size of deployment. Once the threshold is reached, no more reinforcements are allowed and the operations will be declared a failure, with all remaining soldiers on the ground ordered to retreat. The operations will also be stopped if all civilians turn into either protesters or insurgents.

HOW TO USE IT

Chosable Parameters Information Range 1. Reinforcement: Whether reinforcement of soldiers is allowed. On / Off 2. Initalsolidernumber: Initial number of Soldiers 10 - 20 3. Initalinsurgentnumber:Initial number of Insurgents 1 - 15 4. Initalciviliannumber: Initial number of Civilians 0 - 80 5. accuracy: Probability that soldiers avoid collateral damage 0.6 - 0.9 6. effectiveness: Probability that soldiers eliminate the target 0.6 - 0.9

For more details, see Appendix of the paper, "Be Steady and Popular: A Modern Counter-insurgency ABM".

THINGS TO NOTICE

Monitored Parameters Information 1. Soldier casualty: The total number of soldiers killed or injured 2. Insurgents eliminated: The total number of insurgents killed or captured 3. Protesters: The total number of uncooperative protesters 4. Anger: The anger level that all civilians share 5. Civilians remaining: The current count of remaining civilians that are still friendly 6. Tick: The amount of time that the current operation lasts (in minutes)

Ending There are three types of ending: 1. All civilians turn into protesters. 2. All insurgents are eliminated. 3. Soldier casualty exceeds 2*initial deployment.

THINGS TO TRY

  1. For basic Wheeler's model, choose various initial numbers of civilians and observe how that affect the solider-insurgent engagement.

  2. For improved version of Wheeler's model, users could further adjust soldiers' accuracy and effectiveness and monitor the populaiton's anger level, civilian casaulties, new insurgents and protesters.

RELATED MODELS

Governments, Civilians, and the Evolution of Insurgency (2008)

CREDITS AND REFERENCES

Bennett, D. S. (2008). Governments, civilians, and the evolution of insurgency: Modeling the early dynamics of insurgencies. Journal of Artificial Societies and Social Simulation, 11(4), 7.

Wheeler, S. (2005). It pays to be popular: A study of civilian assistance and guerilla warfare. Journal of Artificial Societies and Social Simulation, 8(4).

Comments and Questions

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

Click to Run Model

patches-own [density]

globals[city forest
        soldier_casualty
        insurgent_casualty
        civilian_casualty
        anger new_join
        ending max_anger
successful_ambush]

breed[insurgents insurgent]
breed[civilians civilian]
breed[soldiers soldier]
breed[protesters protester]


soldiers-own[flockmates alert]
civilians-own[panic panic_time]
insurgents-own[detect detect_time]

to setup
  ca
  setup_patches
  setup_individuals

  set soldier_casualty 0
  set insurgent_casualty 0
  set civilian_casualty 0
  set ending 0
  set anger 0
  set new_join 0
  set max_anger 0
  set successful_ambush 0

  reset-ticks
end 

to setup_patches

   ask patches
  [ set density (random 10000) ]
  repeat 2 [  diffuse density 1 ]  ; can change density layout if needed

  ask patches
  [ set pcolor scale-color green density 9000 1000]

  set city min-n-of 120 patches [density]      ; low density city
  set forest max-n-of 20 patches [density]     ; high density forest

  ask city [set pcolor black]
end 

to setup_individuals

  create-civilians initial_civilian_number * 0.9
   [ set size 1.5
    setxy random-xcor random-ycor
    set color white
    set shape "person"
    set panic False
    set panic_time 0
  ]

   create-protesters initial_civilian_number * 0.1
   [ set size 1.5
    setxy random-xcor random-ycor
    set color pink
    set shape "person"
  ]


   create-insurgents initial_insurgent_number
  [ set size 1.5
    setxy random-xcor random-ycor
    set color red
    set shape "person soldier"
    set detect False
    set detect_time 0
  ]


  create-soldiers initial_soldier_number
  [ set size 1.5
    set xcor random-normal 0 1
    set ycor random-normal 0 1
    set color blue
    set shape "person police"
    set flockmates no-turtles
    set alert False
  ]
end 

to go
;user-message "Insurgency has been eliminated"
;user-message "Government forces have been defeated"
  if not any? civilians [ stop ]
  if not any? insurgents [ set ending 1 stop ]
  if not any? soldiers [ set ending 2 stop]
  if soldier_casualty > (initial_soldier_number * 2)
  [set ending 2 stop]

  ask civilians [civilians_movement]
  ask protesters [protesters_movement]
  ask insurgents [insurgents_movement]
  ask soldiers [soldiers_movement]


;  if count civilians < 5
; [ create-civilians 15
;   [ set size 1.5
;    setxy random-xcor random-ycor
;    set color white
;    set shape "person"
;    set panic False
;    set panic_time 0
;  ]
;  ]



  if Reinforcement? [           ; reinforcement: send in 10 more soldiers when there are fewer than 5 remaining
  if count soldiers < 5
  [create-soldiers 10
  [ set size 1.5
    set xcor random-normal 0 1
    set ycor random-normal 0 1
    set color blue
    set shape "person police"
    set flockmates no-turtles
    set alert False
  ]]
  ]

  check-anger

;  ask links [die]
  tick
end 

to  check-anger

  if anger > 0
  [set anger anger - 0.05]

  if anger < 0
  [set anger 0]

  if any? civilians [
  if anger > 10       ; medium anger = more protesters
    [
       let x random 100
       if x > 90
      [ask one-of civilians [die]
          create-protesters 1
         [ set size 1.5
         setxy random-xcor random-ycor
          set color pink
          set shape "person"
            ]
      ]
    ]


  if anger > 20    ; high anger = more insurgents
    [let x random 100
       if x > 90
     [
     set new_join new_join + 1
         create-insurgents 1
       [set size 1.5
        setxy random-xcor random-ycor
        set color red
        set shape "person soldier"
        set detect False
        set detect_time 0
       ]
      ]
     ]
  ]

  if anger > max_anger
  [set max_anger anger]
end 

to protesters_movement
  right random 20
  left random 20
  fd 0.8
end 

to civilians_movement

  if any? insurgents in-radius 4       ; if seeing insurgents, become panic for 20 ticks
  [set panic_time 20]

  ifelse panic_time > 0
  [
;    let target insurgents in-radius 3
;    ask target [set detect True]

    set color yellow
    set panic True
    face min-one-of soldiers [distance myself]           ; run towards soldiers during panic
    set heading heading + random-normal 0 10
    fd 1
    set panic_time panic_time - 1
  ]


  [set panic False
    set color white
    ifelse [density] of patch-ahead 1 < 5500          ; avoid forest when wandering around normally
    [fd 1]
    [set heading heading + 180 + random-normal 0 30
    fd 1]
  ]

;  let p min-one-of patches in-radius 15 [density]
;
;  ifelse [density] of p < density
;  [
;    face p
;    fd  0.6
;     ]
;
;  [  right random 20
;      left random 20
;    fd 0.8
;  ]
end 

to insurgents_movement

  let p max-one-of patches in-radius 20 [density]

  if [density] of p > density [           ;  find nearest forest to hide
    face p
    fd  1]

  if any? civilians in-radius 4 or any? soldiers in-radius 3    ; if seen by soliders or civilians, detected for 20 ticks
  or any? insurgents with [detect = True] in-radius 4
  [set detect_time 20]

  ifelse detect_time > 0
  [set detect True
    face min-one-of turtles with [color != red] [distance myself]     ; move away to hide
    set heading heading + 180 + random-normal 0 30
    fd 1
  set detect_time detect_time - 1 ]
  [set detect False]


  if any? soldiers with [alert = False] in-radius 8   ; ambush those soliders with alert = false
  [
   insurgents-ambush-soldiers
  ]
end 

to soldiers_movement

;    ifelse any? insurgents
;
;    [face one-of insurgents
;    ; [distance myself]
;    set heading heading
;    fd 0.3]
;    [flock]

  if any? civilians with [panic = True] in-radius 10
  or any? insurgents in-radius 3
  or any? soldiers with [alert = True] in-radius 5
  [set alert True]


  if any? civilians in-radius 10
  [misfire]


  ifelse any? insurgents with [detect = True]  in-radius 15
  [
   ifelse alert = True
  [face min-one-of insurgents with [detect = True] [distance myself]
    set heading heading
    fd 1]
  [flock
    fd 1]

  if any? insurgents-here
  [soldiers-fight-insurgents]
  ]

   [set alert False
    flock
    fd 1]
end 

to misfire

  let sight [density] of patch-here

  let x random 100
  if x > (accuracy) * 100 *  9000 / sight

  [  let y random 100
     if y > 50
    [
    set anger anger + 3
    ask one-of civilians in-radius 10 [die]
    set civilian_casualty civilian_casualty + 1
    ]
  ]
end 

to soldiers-fight-insurgents
  let x random 100

  ifelse x > (1 - effectiveness) * 100

  [
  ask min-one-of insurgents with [detect = True] [distance myself] [die]
  set insurgent_casualty insurgent_casualty + 1

    let y random 100
    if y > (accuracy * 100)
    [
      if any? civilians in-radius 10
      [set anger anger + 1.5
       ask one-of civilians in-radius 10 [die]
      set civilian_casualty civilian_casualty + 1]     ;; low accuracy cause more civilian death
     ]

  ]

  [  set soldier_casualty soldier_casualty + 1
    set successful_ambush successful_ambush + 1
     die
     ]
end 

to insurgents-ambush-soldiers
  set detect True

  let x random 100
  ifelse x > 70                          ; 70% kill soldier and 30% insurgent dies

  [
    set insurgent_casualty insurgent_casualty + 1
    let y random 100
    if y > (accuracy * 100)
     [if any? civilians in-radius 10
        [set anger anger + 3
         ask one-of civilians in-radius 10 [die]
      set civilian_casualty civilian_casualty + 1]     ;; low accuracy cause more civilian death
     ]
    die
  ]

  [ let insurgent-target one-of soldiers with [alert = False] in-radius 8

    ask insurgent-target [die]
  set soldier_casualty soldier_casualty + 1
  ask soldiers in-radius 8 [set alert True]]
end 



;; flocking code

to flock
  find-flockmates
  let nearest-neighbor min-one-of flockmates [distance myself]
  if any? flockmates
    [
      ifelse distance nearest-neighbor < 1
        [ separate ]
        [ align
          cohere ] ]
end 

to find-flockmates
  set flockmates other soldiers in-radius 8
end 

to find-nearest-neighbor
  let nearest-neighbor min-one-of flockmates [distance myself]
end 

;;; SEPARATE

to separate
  let nearest-neighbor min-one-of flockmates [distance myself]
  turn-away ([heading] of nearest-neighbor) 1.5
end 

;;; ALIGN

to align  ;; turtle procedure
  turn-towards average-flockmate-heading 5
end 

to-report average-flockmate-heading
  let x-component sum [dx] of flockmates
  let y-component sum [dy] of flockmates
  ifelse x-component = 0 and y-component = 0
    [ report heading ]
    [ report atan x-component y-component ]
end 

to cohere
  turn-towards average-heading-towards-flockmates 3
end 

to-report average-heading-towards-flockmates
  let x-component mean [sin (towards myself + 180)] of flockmates
  let y-component mean [cos (towards myself + 180)] of flockmates
  ifelse x-component = 0 and y-component = 0
    [ report heading ]
    [ report atan x-component y-component ]
end 

to turn-towards [new-heading max-turn]
  turn-at-most (subtract-headings new-heading heading) max-turn
end 

to turn-away [new-heading max-turn]
  turn-at-most (subtract-headings heading new-heading) max-turn
end 

to turn-at-most [turn max-turn]
  ifelse abs turn > max-turn
    [ ifelse turn > 0
        [ rt max-turn ]
        [ lt max-turn ] ]
    [ rt turn ]
end 

There is only one version of this model, created over 3 years ago by Yicheng Shen.

Attached files

File Type Description Last updated
Bennett_2008_JASSS_EvolutionofInsurgency.pdf pdf Reference of Bennett over 3 years ago, by Yicheng Shen Download
Paper for this improved model.pdf pdf My paper for describing this improved model over 3 years ago, by Yicheng Shen Download
Wheeler 2005 JASSS It pays to be Popular.pdf pdf Basic Reference of Wheeler over 3 years ago, by Yicheng Shen Download

This model does not have any ancestors.

This model does not have any descendants.