This page was automatically generated by NetLogo 3.1.4. Questions, problems? Contact firstname.lastname@example.org.
The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun’s Java site. General information on the models, including instructions for running them on your own computer, is available from the NetLogo Simulation Information Page. To download this page, do not use "Save As," but right-click (or on Macs control-click) on this link. You also need to download the NetLogo program, which you can do by right-clicking or control-clicking this link.
created with NetLogo
view/download model file: Generalized-Vants.nlogo
This is a general virtual ant ("vant") model. It shows how extremely simple deterministic rule can result in very complex-seeming behavior. It also demonstrates the concept of time reversibility and shows that time reversibility is not incompatible with complex behavior.
The world is a grid of patches. By default each patch can be either black or white. Initially, they are all white.
The default rule that the "vants" (virtual ants) follow is very simple. Each vant faces north, south, east, or west. At each time step, a vant moves to the next patch. Then it looks at the new patch:
- If the new patch is white, the vant colors the patch black and turns right 90 degrees.
- If the new patch is black, the vant colors the patch white and turns left 90 degrees.
The world wraps, so when a vant moves off one side of the view it reappears at the other side.
The model also permits you to enter your own vant rule, which allows more than two states, indicated by a variety of colors. In this case, a vant looks at the new patch and turns left or right depending on the specified rule. It also advances the state of the patch to the next color, or wraps around to the first color if it is already at the last one.
The CRUD-DENSITY slider determines the percentage of "crud" (black patches) in the initial world. When the vants encounter this crud they behave in a more complex way.
The SETUP button colors all the patches white (except for the specified crud) and creates a number of vants determined by the the NUM-VANTS slider.
Pressing the FORWARD button makes the vants start to move according to the normal rules.
You can stop the FORWARD button and then press the REVERSE button instead to make the vants move backwards instead of forwards, while still following the same turning rule.
You can use ENTER RULE STRING to enter your own vant behavior rule. Enter a list of between two and twelve 0's and 1's separated by spaces (e.g., "[1 0 0 1 1 0 1]" without the quotation marks). This means that if we encounter the first state we turn right (1); encounter the second, turn left (0); encounter the third, turn left (0), and so forth. The number of states is the number of entries in this list. (The default rule is [1 0].)
The model runs very fast. You may want to use the speed slider (on the top edge of the view) to slow the model down so you see the vants following the rules in slow motion.
To make it easier to see, the vant is shown as larger than a patch.
The resulting patterns sometimes have obvious structure, but sometimes appear random, even though the rules are deterministic.
Call the diagonal paths that form "highways". Are there different kinds of highways?
Compare the results with one vant to those with multiple vants. Are there any behaviors you get with multiple vants that don't occur with just one?
When there are multiple vants, they are initially given random headings. That means that you may get different looking behavior even with the same number of vants, depending on the directions they start out facing.
If you press the REVERSE button, the vants turn then move backwards, instead of moving forwards then turning. The turn rule is the same. What effect does this have? Press SETUP, run the model forwards a little, then stop the GO button and press REVERSE instead.
Without changing the rules, you could change the visualization by making different vants different colors and color-coding the patches to show which vant touched a patch last. This should make some additional structure apparent to the eye.
You can use the SORT primitive to created a list of turtles sorted by who number. That is necessary in this model because we need the turtles to execute in the same order at every tick, rather than a different random order every tick as would happen if we just said "ask turtles".
Turing Machine 2D -- similar to Vants, but much more general. This model can be easily configured to use Vants rules, or to use other rules.
The rules for Vants were originally invented by the artificial life researcher Chris Langton.
Modified 2007-09-29 by B.J. MacLennan to allow specifying the rule for the vants and an initial density of "crud" (black patches), as in Gary William Flake's "vants" program for "The Computational Beauty of Nature" (MIT Press, 1998).
To refer to the original model in academic publications, please use: Wilensky, U. (2005). NetLogo Vants model. http://ccl.northwestern.edu/netlogo/models/Vants. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.