Information, influence and decision model

No preview image

1 collaborator

Iron_label_brush_2 CJ Castillo (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.4 • Viewed 359 times • Downloaded 31 times • Run 0 times
Download the 'Information, influence and decision 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.)


Comments and Questions

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

Click to Run Model

turtles-own [information]  ;;Information is just the distance of a turtle from other turtles

to setup
  clear-all
  reset-ticks
  create-turtles num-turtle [
    setxy random-xcor random-ycor
    set heading one-of [0 180]
    set information random-float 10
    ifelse heading = 0 [set color red][set color blue]
  ]
end 

to move
  ask turtles [
    forward 0.05
    change-direction
  ]

  tick
end 

to change-direction
  let current-turtle self
  ask current-turtle [
    ifelse count turtles with [distance current-turtle <= [information] of current-turtle and heading = 0] >
    count turtles with [distance current-turtle <= [information] of current-turtle and heading = 180] [
      set heading 0
      set color red]
    [set heading 180
      set color blue]
  ]
end 

to plot-turtles
  plot count turtles with [heading = 0]
end 

to news
  ask n-of (random count turtles) turtles [
    ifelse heading = 0 [
      set heading 180][set heading 0]
  ]
end 

There are 2 versions of this model.

Uploaded by When Description Download
CJ Castillo over 5 years ago Input for number of turtles has been added. Download this version
CJ Castillo over 5 years ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.