NetLogo banner

 Contact Us

 Modeling Commons

 User Manuals:


NetLogo User Community Models

(back to the NetLogo User Community Models)


by James Steiner (Submitted: 10/26/2004 )

[screen shot]

Download chain-of-fools-2004
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

(You can also run this model in your browser, but we don't recommend it; details here.)


A simple model. A chain of linked turtles. They follow each other. That is, each link as a "leader". Each link steps toward its leader, until it is some minimum distance, if the leader is too close, the link steps away at a preset angle.

Use the sliders and switches to vary the rules that are used.

Some interesting effects emerge, especially with many links.

Note: the best speed results when the effective link size is 1.0.
so, when scale-with-min-dist is on, min-dist * scale-factor should be 1
other values will be significantly slower.

To effectively use larger chains, don't scale down, rather, increase the
size of the screen, and reduce the pixels-per-patch. By keeping the effective size at 1.0, even very long chains can be effectively used.

The controls:

pop - how many links in the chain. can not be changed during GO.

min-dist - the closest that links want to get
when 'scale-with-min-dist' is on,
size-factor is multiplied by this value.

step-size - how far a link moves each step
smaller values make for smoother movement,
but experiement with larger values too:
interesting effects emerge.

avoid-heading - the angle added to the current heading
when the lead is too close

size-factor - the base size of the links.

scale-with-min-dist - when on, the size is scaled by min-dist.
for links that seem to be connected, turn this on,
then set size-factor to 2.

double-correct - after turning away and stepping forward or backward,
turn back by the same amount

shape-choice - choose the shape to use for the chain.
different shapes reveal different information about the chain
- lines show the way angles change
- circle hides the chaning angles, but lets one focus on
the chain as a whole.
- dotted-vector accentuates the curvyness of a shape.

frame-skip - model skips displaying this many frames. speeds things up,
can hide complexity for rapidly evolving shapes,
can use to freeze-frame repeating shapes, and determine the cycles


when a link wraps across an edge, the result is usually that the follower turns and crosses the screen to get back to it. this can keep a chain system unstable.

some chain systems will stabilize given enough room and time
some will shrink/expand into a circle
some never calm down
some seem stable for awhile (especially larger chains) then suddenly shift.
note that often the overall *shape* is fairly stable, even though the individual members are racing around and around the perimiter.


* Well chosen shapes can expose information.
* Using nodisplay and display to control screen-redrawing
* Storing turtles in a turtle variable creates linked turtles
* turtle scaling strongly affects execution speed.

This work is Copyright 2004 James P. Steiner.

This works is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License v. 2.0.

To view a copy of this license, visit or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

In summary:

You are free:

* to copy, distribute, display, and perform the work
* to make derivative works

Under the following conditions:

(by) Attribution. You must give the original author credit.

(nc) Noncommercial. You may not use this work for commercial purposes.

(sa) Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one.

* For any reuse or distribution, you must make clear to others the license terms of this work.

* Any of these conditions can be waived if you get permission from the copyright holder.

Your fair use and other rights are in no way affected by the above.

This is a human-readable summary of the Legal Code (the full license) available at the link above.

(back to the NetLogo User Community Models)