to setup ca crt 1 ; create one yellow turtle ask turtles [ set color yellow ] end to do-random-walk every 0.1 [ ; keep it from going too fast ask turtles [ rt random-float 360 ; set random heading forward 1 ; advance one step stamp blue ; stamp blue the patch that has been visited ] ] end @#$#@#$#@ GRAPHICS-WINDOW 313 10 647 365 40 40 4.0 1 10 1 1 1 CC-WINDOW 5 173 302 348 Command Center BUTTON 59 70 114 103 NIL setup NIL 1 T OBSERVER T BUTTON 130 70 266 103 NIL do-random-walk T 1 T OBSERVER T @#$#@#$#@ WHAT IS IT? ----------- This code example is a demo of a basic random walk. At each step, the yellow turtle changes its heading randomly. The patches visited by the turtle are stamped blue. @#$#@#$#@ default true 0 Polygon -7566196 true true 150 5 40 250 150 205 260 250 @#$#@#$#@ NetLogo 2.0beta5 @#$#@#$#@ setup repeat 6000 [ ask turtles [ rt random-float 360 ; set random heading forward 1 ; advance one step stamp blue ; stamp blue the patch that has been visited ] ] @#$#@#$#@ @#$#@#$#@