Random Walk Example
Model was written in NetLogo 5.0.4
•
Viewed 1008 times
•
Downloaded 153 times
•
Run 2 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This code example is a demo of a basic random walk. At each step, the yellow turtle changes its heading randomly.
THINGS TO NOTICE
The turtle's pen is down, so it leaves a trail behind it in the drawing.
RELATED MODELS
Random Grid Walk Example: the same except that the random walk is constrained to lie on a grid
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
to setup clear-all crt 1 ; create one turtle [ set color yellow pen-down ] reset-ticks end to go ask turtles [ rt random 360 ; set random heading forward 1 ; advance one step ] tick end ; Public Domain: ; To the extent possible under law, Uri Wilensky has waived all ; copyright and related or neighboring rights to this model.
There are 10 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Random Walk Example.png | preview | Preview for 'Random Walk Example' | over 12 years ago, by Uri Wilensky | Download |
This model does not have any ancestors.
This model does not have any descendants.