Fake nieuws

No preview image

1 collaborator

Default-person Jochem Donny (Author)

Tags

nieuws 

Tagged by Jochem Donny 8 months ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.2 • Viewed 123 times • Downloaded 4 times • Run 0 times
Download the 'Fake nieuws' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

turtles-own[fake-news?
            dont-believe-it?
            reaction-time?
            different-fake-news?]

;;---------------------------------------------------------------------------
;; setup
;;----------------------------------------------------------------------------

to setup
  clear-all
  setup-agents
  setup-network
  setup-fake-news
  setup-reaction-time
  reset-ticks
end 

;;-------------------------------------------------------------------------
;; go
;;-------------------------------------------------------------------------

to go
  set-reaction-time
  spread-fake-news
  tick
end 

to spread-fake-news
  if aantal-verschillende-fake-nieuws = 1 [
  ask turtles with [fake-news? and different-fake-news? = 1]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid
          [sent-fake-news ]
        [dont-believe-it]
  ] ]]

  if  aantal-verschillende-fake-nieuws = 2 [
  ask turtles with [fake-news? and different-fake-news? = 1]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid
          [sent-fake-news ]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 2]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-2
          [sent-fake-news-2]
        [dont-believe-it]
  ] ]
  ]

  if aantal-verschillende-fake-nieuws = 3 [
  ask turtles with [fake-news? and different-fake-news? = 1]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid
          [sent-fake-news ]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 2]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-2
          [sent-fake-news-2]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 3]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-3
          [sent-fake-news-3]
        [dont-believe-it]
  ] ]
  ]
  if aantal-verschillende-fake-nieuws = 4 [
  ask turtles with [fake-news? and different-fake-news? = 1]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid
          [sent-fake-news ]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 2]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-2
          [sent-fake-news-2]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 3]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-3
          [sent-fake-news-3]
        [dont-believe-it]
  ] ]
   ask turtles with [fake-news? and different-fake-news? = 4]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-4
          [sent-fake-news-4]
        [dont-believe-it]
  ] ]
  ]
  if aantal-verschillende-fake-nieuws = 5 [
  ask turtles with [fake-news? and different-fake-news? = 1]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid
          [sent-fake-news ]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 2]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-2
          [sent-fake-news-2]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 3]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-3
          [sent-fake-news-3]
        [dont-believe-it]
  ] ]
   ask turtles with [fake-news? and different-fake-news? = 4]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-4
          [sent-fake-news-4]
        [dont-believe-it]
  ] ]
  ask turtles with [fake-news? and different-fake-news? = 5]
    [ ask link-neighbors with [not fake-news? and not dont-believe-it?]
        [ ifelse random-float 1 < fake-nieuws-betrouwbaarheid-5
          [sent-fake-news-5]
        [dont-believe-it]
  ] ]
  ]
end 

to sent-fake-news
    if reaction-time? < 0 [
      become-fake-news
    ]
end 

to dont-believe-it
  if reaction-time? < 0 [
  set dont-believe-it? true
  set color gray
  ]
end 

to set-reaction-time
  ask turtles [
   set reaction-time? reaction-time? - 1
  ]
end 

;;----------------------------------------------------------------------------------
;; setup
;;----------------------------------------------------------------------------------

to setup-network
  let num-links ( 5 * aantal-mensen) / 2
  while [count links < num-links ]
  [
    ask one-of turtles
    [
      let choice (min-one-of (other turtles with [not link-neighbor? myself])
                   [distance myself])
      if choice != nobody [ create-link-with choice ]
    ]
  ]
end 

to setup-fake-news
  ask n-of aantal-fake-nieuws turtles
    [ become-fake-news ]
  if aantal-verschillende-fake-nieuws = 2 [
    ask n-of aantal-fake-nieuws-2 turtles
    [ become-fake-news-2]
  ]
  if aantal-verschillende-fake-nieuws = 3 [
    ask n-of aantal-fake-nieuws-2 turtles
    [ become-fake-news-2]
    ask n-of aantal-fake-nieuws-3 turtles
    [ become-fake-news-3]
  ]
  if aantal-verschillende-fake-nieuws = 4 [
    ask n-of aantal-fake-nieuws-2 turtles
    [ become-fake-news-2]
    ask n-of aantal-fake-nieuws-3 turtles
    [ become-fake-news-3]
    ask n-of aantal-fake-nieuws-4 turtles
    [ become-fake-news-4]
  ]
  if aantal-verschillende-fake-nieuws = 5 [
    ask n-of aantal-fake-nieuws-2 turtles
    [ become-fake-news-2]
    ask n-of aantal-fake-nieuws-3 turtles
    [ become-fake-news-3]
    ask n-of aantal-fake-nieuws-4 turtles
    [ become-fake-news-4]
    ask n-of aantal-fake-nieuws-5 turtles
    [ become-fake-news-5]
  ]
end 

to become-fake-news
  set fake-news? true
  set different-fake-news? 1
  set color red
end 

to setup-reaction-time
  ask turtles[
    set reaction-time? reactie-tijd + random 100
  ]
end 

to setup-agents
   create-turtles aantal-mensen[
    set fake-news? false
    set dont-believe-it? false
    setxy random-xcor random-ycor
    set color green
    set shape "dot"

  ]
end 

;;---------------------------------------------------------------------------------
;; 2
;;--------------------------------------------------------------------------------

to become-fake-news-2
  set fake-news? true
  set different-fake-news? 2
  set color blue
end 

to sent-fake-news-2
    if reaction-time? < 0 [
      become-fake-news-2
    ]
end 

;;---------------------------------------------------------------------------------
;; 3
;;--------------------------------------------------------------------------------

to become-fake-news-3
  set fake-news? true
  set different-fake-news? 3
  set color orange
end 

to sent-fake-news-3
    if reaction-time? < 0 [
      become-fake-news-3
    ]
end 

;;---------------------------------------------------------------------------------
;; 4
;;--------------------------------------------------------------------------------

to become-fake-news-4
  set fake-news? true
  set different-fake-news? 4
  set color magenta
end 

to sent-fake-news-4
    if reaction-time? < 0 [
      become-fake-news-4
    ]
end 

;;---------------------------------------------------------------------------------
;; 5
;;--------------------------------------------------------------------------------

to become-fake-news-5
  set fake-news? true
  set different-fake-news? 5
  set color yellow
end 

to sent-fake-news-5
    if reaction-time? < 0 [
      become-fake-news-5
    ]
end 

There is only one version of this model, created 8 months ago by Jochem Donny.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.