Turtles and Conditional Probability

Turtles and Conditional Probability preview image

1 collaborator

Roger_day Roger Day (Author)

Tags

probability 

Tagged by Roger Day over 2 years ago

random walk 

Tagged by Roger Day over 2 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 156 times • Downloaded 15 times • Run 0 times
Download the 'Turtles and Conditional Probability' 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

globals [ turtle-my-color my-turn]
directed-link-breed [ paths path]
breed [ turtle-starts turtle-start ]
breed [ turtle-ends turtle-end ]

to setup
  clear-all
  set-default-shape turtles "turtle"
  create-turtle-starts number [
    set turtle-my-color  15 + 10 * who
    set color turtle-my-color
    setxy 0 0
    set size turtle-size
  ]
  reset-ticks
end 

to go
  ;; if not any? turtles [ stop ]
  ask turtle-starts [
    ifelse label-on? [ set label who + 1] [ set label "" ]
    ifelse do-stamp [ stamp ] [  ]
    ifelse is-pen-down [ pen-down ] [pen-up]
    move ]
  ;;ask links [ connect-turtles ]
  tick
end 

to move  ;; turtle procedure
  set my-turn  2 * (random angle) - angle / 2
  rt random angle  ;; right turn
  ;;lt random angle  ;; left turn
  ifelse stepsize = 0
     [ setxy random-xcor random-ycor ] ;; random jump
     [fd stepsize ]   ;; forward
end 

There are 2 versions of this model.

Uploaded by When Description Download
Roger Day over 2 years ago Turtles teach us about Conditional Probability Download this version
Roger Day over 2 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Turtles and Conditional Probability.png preview Preview for 'Turtles and Conditional Probability' over 2 years ago, by Roger Day Download

This model does not have any ancestors.

This model does not have any descendants.