Capitol Insurrection

Capitol Insurrection preview image

1 collaborator

Default-person David Knoke (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.3.0 • Viewed 7 times • Downloaded 0 times • Run 0 times
Download the 'Capitol Insurrection' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

;; Capitol Insurrection
;; David Knoke
;; August 8, 2024

;; Types of agents = Proud Boys, Oath Keepers, Bystanders, Recruits, Polices
breed [ proudboys proudboy ]
breed [ oathkeepers oathkeeper ]
breed [ bystanders bystander ]
breed [ recruits recruit ]
breed [ polices police ]
proudboys-own [target]
oathkeepers-own [target]
recruits-own [target]

globals [
  colors    ;; Proud Boys & Oath Keepers = red, Police = blue,  Bystanders = orange, Recruits = green, Insurrectonists in Chambers = magenta
  initial-red
  initial-orange
  initial-blue

  capitol-patches    ;; agentset of US Capitol building
  plaza-patches      ;; agentset of Proud Boys, Oath Keepers, Bystanders, Recruits
  house-patches      ;; agentset of House Chamber
  senate-patches     ;; agenset of Senate Chambee
  brig-patches       ;; agentset of brig (holding pen for arrested rioters)
  infirmary-patches  ;; agentset of infirmary for injured police

  chamberpct         ;; percent insurrectionists in House and Sente
  brigpct            ;; percent insurrectionists arrested
  infirmarypct       ;; percent police injured
  recruitpct         ;; percent of bystanders recruited
]

to setup       ;; Create infrastructure
  clear-all

;; Create plaza
  set plaza-patches patches with [pycor <= 5]
  ask plaza-patches [set pcolor gray + 4]

;; Create  Capitol building
  set capitol-patches patches with [pycor >= 7 and pycor <= 29]
  ask capitol-patches [set pcolor white]

;; Label US Capitol
  ask patch (0.11 * max-pxcor) (0.90 * max-pycor) [
    set plabel-color black
    set plabel "U.S. CAPITOL"
  ]

;; Create Brig & Infirmary
  set brig-patches patches with [pycor >= 26 and pycor <= 29 and pxcor >= 5 and pxcor <= 15]
  ask brig-patches [set pcolor orange]

  set infirmary-patches patches with [pycor >= 26 and pycor <= 29 and pxcor >= -15 and pxcor <= -5]
  ask infirmary-patches [set pcolor lime]

;; Label Brig & Infirmary
  ask patch (0.25 * max-pxcor ) (0.80 * max-pycor) [
    set plabel-color black
    set plabel "BRIG"
  ]

    ask patch (-0.20 * max-pxcor ) (0.80 * max-pycor) [
    set plabel-color black
    set plabel "INFIRMARY"
  ]

;; Create Senate Chanber
  set senate-patches patches with [pxcor <= -25 and pxcor >= -29 and pycor >= 15 and pycor <= 29]
  ask senate-patches [set pcolor yellow]

;; Label Senate Chanber
    ask patch (0.85 * min-pxcor  ) (0.45 * max-pycor) [
    set plabel-color black
    set plabel "SENATE"
  ]

;; Create House
;;  set infirmary-patches patches with [pxcor >= 21 and pxcor <= 29 and pycor >= 1 and pycor <= 8]
  set house-patches patches with [pxcor >= 25 and pxcor <= 29 and pycor >= 15 and pycor <= 29]
  ask house-patches [set pcolor yellow]

  ;; Label House Chamber
    ask patch (0.92 * max-pxcor  ) (0.45 * max-pycor) [
    set plabel-color black
    set plabel "HOUSE"
  ]

  draw-walls
  setup-turtles
  reset-ticks
end 

to draw-walls
  ;; Draw four walls of Capitol
    ask patches with [pycor >= 6 and pxcor = -30]
    [set pcolor black]
  ask patches with [pycor >= 6 and pxcor = 30]
    [set pcolor black]
  ask patches with [pycor = 6]
    [set pcolor black]
  ask patches with [pycor = 30]
     [set pcolor black]
  ;; Put 5-patch doors in front walls
  ask patches with [pycor = 6 and (pxcor = -17 or pxcor = -16 or pxcor = -15 or pxcor = -14 or pxcor = -13)]
    [set pcolor brown]
  ask patches with [pycor = 6 and (pxcor = 13 or pxcor = 14 or pxcor = 15 or pxcor = 16 or pxcor = 17)]
    [set pcolor blue]
end 

to setup-turtles

;;  Create  breeds of turtles and move to locations
  create-oathkeepers N-Oath-Keepers  [
    setxy random-xcor random-ycor
    set color red
    set shape "person"
    set size 4
    move-to-location plaza-patches
  ]

    create-proudboys N-Proud-Boys  [
    setxy random-xcor random-ycor
    set color red
    set shape "person"
    set size 4
    move-to-location plaza-patches
  ]

    create-bystanders N-Bystanders  [
    setxy random-xcor random-ycor
    set color orange
    set shape "person"
    set size 3
    move-to-location plaza-patches
  ]

  create-polices N-Police [  ;; create  police
    setxy random-xcor random-ycor
    set color blue
    set shape "person"
    set size 4
    move-to-location capitol-patches
  ]

;;  Count how many turtles of each color at start
  set initial-red count turtles with [color = red]
  set initial-orange count turtles with [color = orange]
  set initial-blue count turtles with [color = blue]

;;  reset-ticks
end 

to go
;;  Stop when no Proud Boys and Oath Keepers still red
  if (count turtles with [color = red] = 0)
    [stop]
  move
  breakdoor
  breakwindow
  entice
  arrest
  injure
  tally
  tick
end 

to move    ;;  Move turtles, preventing them from moving through Capitol walls

  ask oathkeepers [
    right random 360
    if pcolor = black or pcolor = brown or pcolor = blue
    [move-to-location plaza-patches]
    set target patch 27 25
    face target
    forward 1
  ]

  ask proudboys [
    right random 360
    if pcolor = black or pcolor = brown or pcolor = blue
    [move-to-location plaza-patches]
    set target patch -27 25
    face target
    forward 1
  ]

  ask bystanders [
    right random 360
    if pcolor = black or color = brown or pcolor = blue or pcolor = white
    [move-to-location plaza-patches]
    forward 1
  ]

  ask polices [
    right random 360
    if pcolor = black or pcolor = gray + 4 or pcolor = orange or pcolor = yellow or pcolor = lime
    [move-to-location capitol-patches]
    forward 1
  ]

  ask recruits [
    right random 360
    if pcolor = black or pcolor = brown or pcolor = blue
    [move-to-location plaza-patches]
    set target patch 0 20
    face target
    forward 1
    ]
end 

;; Random recruitment of bystanders to become recruits requires contact wit N red turtles
;; When bystanders become recruits, they change color, breed, and target Capitol

to entice
  ask turtles with [color = orange] [
    if count turtles-here with [color = red] = 2 and random 100 < recruit-probability [
      if breed = bystanders [set breed recruits]
      set color green
      set shape "person"
      set size 2
    ]
  ]
end 

to move-to-location [locations]
  move-to one-of locations
end 

;; Two red turtles (Proud Boys and/or Oath Keepers) must arrive together to break door or window to enter Capitol

to breakwindow
  ask patches with [pcolor = blue] [
    if count turtles-here with [color = red] = 2
    [set pcolor white]
    ]
end 

to breakdoor
  ask patches with [pcolor = brown] [
    if count turtles-here with [color = red] = 2
    [set pcolor white]
    ]
end 


;; Proud Boys can injure Police, with given probability, sending Police to Infirmary

to injure
  ask turtles with [color = blue] [
    if any? turtles-here with [color = red] and random 100 < injury-probability [
      set color blue - 2
      set shape "person"
      set size 1
    ]
  ]

    ask turtles with [color = blue - 2] [
      if pcolor = black or pcolor = white or pcolor = yellow or pcolor = orange or pcolor = blue
      [move-to-location infirmary-patches]
    ]
end 

;; Police can arrest Proud Boys & Oathkeepers, with set probability, sending instugators to Brig

to arrest
  ask turtles with [color = red] [
    if any? turtles-here with [color = blue] and random 100 < arrest-probability [
      set color black
      set shape "person"
      set size 1
    ]
  ]

  ask turtles with [color = black] [
    if pcolor = black or pcolor = white or pcolor = yellow or pcolor = green
    [move-to-location brig-patches]
  ]

;; If Proud Boy and Oath Keeper (red) enters a Chamber (yellow), change color to magenta (reached goal). Simulation ends when no one is red.
  ask turtles with [color = red] [
    if pcolor = yellow [set color magenta]
  ]
end 

;; Calculate percentages of agents at end of run

to tally   ;; Percentages for BehaviorSpace replications
  set chamberpct    count turtles with [color = magenta] / initial-red * 100
  set brigpct       count turtles with [color = black] / initial-red * 100
  set infirmarypct  count turtles with [color = blue - 2] / initial-blue * 100
  set recruitpct    count turtles with [color = green] / initial-orange * 100
end 

There is only one version of this model, created 3 days ago by David Knoke.

Attached files

File Type Description Last updated
Capitol Insurrection.png preview Preview for 'Capitol Insurrection' 3 days ago, by David Knoke Download

This model does not have any ancestors.

This model does not have any descendants.