secure base phenomenon

secure base phenomenon preview image

5 collaborators

Default-person Carlo Schuengel (Author)
Pasco Fearon (Author)
Lianne Bakkum (Author)
Sam Wass (Author)
Alastair van Heerden (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.4.0 • Viewed 76 times • Downloaded 1 time • Run 0 times
Download the 'secure base phenomenon' 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

globals [carer infant explore-ticks]

turtles-own [goal secure-range]

to setup
  clear-all
  set-default-shape turtles "default"
  create-turtles 2 [
    setxy random-xcor random-ycor
    set color ifelse-value who = 0 [red] [blue]
    set size 2
  ]
  ask turtle 0 [set carer self]
  ask turtle 1 [
    set infant self
    set goal "explore"
    set secure-range secure-range-slider
    set explore-ticks 0
  ]
  reset-ticks
end 

to go
  ask carer [
    ifelse random-float 1 < 0.5
    [ask infant [set goal "explore"]]
    [ask infant [set goal "security"]]
  ]
  ask carer [
    ifelse random-float 1.0 < 0.05 [ ; Adjust the probability (0.05) as needed
      random-movement ; Add this line to introduce random movement to carer
    ] [
      ; Carer stays in place
    ]
  ]

  ask infant [
    ifelse goal = "explore"
    [fd 1
         set explore-ticks explore-ticks + 1]
    [ifelse distance carer <= secure-range
      [set goal "explore"]
      [face carer fd 1]
      ]
  ]
  tick
end 

to random-movement
  ; Move the carer randomly
  rt random 360  ; Randomly turn the carer
  fd random carer-movement-slider         ; Move the carer forward (adjust the distance as needed)
end 

There is only one version of this model, created 4 months ago by Carlo Schuengel.

Attached files

File Type Description Last updated
secure base phenomenon.png preview Preview for 'secure base phenomenon' 4 months ago, by Carlo Schuengel Download

This model does not have any ancestors.

This model does not have any descendants.