Contents

For help on an area of the Anty World Screen, click on the area of the following screen:

Additionally, the following help topics are available:

Theory Behind Anty World

References

About the Author

For help on help, press F1.


Theory behind Anty World

Anty World is a very simple cellular automaton.  In it, the user gives an ant a set of rules that it must follow.  The rules in this world determine how the ant will turn.  The rule set that is chosen can result in a multitude of patterns.  They can be as simple as a four square box, they can be complex patterns, they can be purely chaotic or they can produce a combination of patterns.

The realm of the ants world, Anty World, is a grid of colored squares.  In this simulation, the ant starts in the middle of a grid of black squares.  The ant begins walking and as it leaves a square it changes the squares color.  It then examines the color of the square it is on and decides whether to turn left or right based on this color.  The number of possible colors in this simulation is determined by the ants rule string.

The original idea was advanced by Chris Langton of the Sante Fe Institute.  His first ant followed the following rule set:

If the square is black then color square white and turn right.

If the square is white then color square black and turn left.

This ant is referred to as Langtons Ant.  Although this rule set seems extremely simple, it creates a seemingly chaotic pattern for the first 10,000 or so steps.  After this, however, it creates a pattern that causes the ant to create the same pattern again but offset by a few squares.  This leads to an infinite number of these patterns being created, each slightly offset from and overlapping the previous.  This phenomena has been termed highway construction.  This ant can be seen working by playing the default rule string in the simulation.

The rule string that can be entered in the main window has the following affect on the ant and its world:

Anty World consists of as many colors as the string is long.

When the ant leaves a square, it increments the color shade.

When the color shade is at its highest, the color wraps around to black.

The ant looks at the color that it has just stepped on, call it n.

If the nth character of the rule string is L then it turns left.

If the nth character of the rule string is R then it turns right.

The ant will continue its step, turn and increment behavior until interrupted by the user or until it walks out of the realm of Anty World.

See Also

References

About the Author


Anty World File Commands

At present the only file command is to exit.  This is the same as exit command button.


Anty World Help

This selection will bring you to this help file.  Addditionally, Help...About will provide version and author information.


Anty World Options

From the options menu, the user can adjust both the scale and the color scheme used in the Anty World Display.

Scale

The scale option allows the user to adjust the number of pixels that are displayed for each valid ant position.  A scale ratio of 1:1 displays a single pixel for the ants position.  For greatest detail, a scale ratio of 4:1 will provide a zoom factor of four.  When the scale is changed, the size of the Anty World is not adjusted.  However, the effective size of the world is changed and is updated in the Anty World Scale Display.  The scale cannot be changed without stopping the simulation and beginning a new one.

Color Shade

This controls the colors that the ant will paint each of its squares.  Choosing Red, Green, Blue or White produces shades of the desired color.  Each time the ant steps on a square, it will increase the intensity of the color.  When the brightest shade has been used, the color will wrap around to the darkest shade.  When Random is chosen, random colors are assigned to the different shades.  However, all squares that are visited the same number of times will have the same color.  The Color Shade may be changed while the simulation is running.  This will not affect the current squares, but will only affect the squares the ant subsequently visits.

Wraparound

When this option is checked, the ant will not stop the simulation when it hits a border.  The ant will wrap around to the other side of the screen and continue its journey.


Anty World Display Screen

This is the world that the ant lives in.  This displays the ants motion using colors and sizes that are specified in the Options menu.  This screen is controlled by the tape deck style control buttons to its left.

See Also

Theory Behind Anty World


Anty World Iteration Display

This box displays the number of steps that the ant takes.  It is updated every 128 steps or whenever the simulation is paused or stopped.


Anty World Scale Display

This displays the actual size of Anty World.  This can be changed by resizing the window, which will resize the Anty World Display.  The window has a minimum size that it can be made, however, its maximum size is limited only by the computers screen resolution.  This can also be changed by the scale option.


Anty World Rule-String Input

This input field gives the ability to change the rules that the ant obeys.  A valid rule string cosists of only the characters L and R.  It must be between 2 and 16 characters in length.  All other combinations are illegal.  The rule string is applied as follows:  If the square the ant steps on is the value n, then the nth character of the string is evaluated.  If it is a R then the ant will turn right.  If it is a L then the ant will turn left.  The default for this field is RL.  This corresponds to Langstons Ant as described in Theory Behind Anty World


Anty World Simulation Controls

The simulation controls take the form of simple tape deck style controls.  To begin the simulation or to restart it from a paused state, press the Play button [image].  To pause a simulation that is running, pres the Pause button [image].  To end a simulation, press the Stop button [image].  Additionally, the simulation will automatically stop when the ant tries to wander outside of its world.


Anty World Exit

Use this to stop the simulation and exit the program.


References

All information for this program was taken from the following reference:

MATHEMATICAL RECREATIONS.  Ian Stewart in Scientific American, Vol. 271, No. 1, pages 104-107; July 1994.

For completeness, his reference section follows:

WINNING WAYS, VOL 2:  FOR YOUR MATHEMATICAL PLAYS:  GAMES IN PARTICULAR.  Elwyn R. Berlekamp, John H. Conway and Richard K. Guy.  Academic Press, 1982.

COMPUTER RECREATIONS.  A. K. Dewdney in Scientific American, Vol. 261, No. 3, pages 180-183; September 1989 and Vol. 262, No. 3, pages 118-121; March 1990.

MATHEMATICAL ENTERTAINMENTS. Daved Gale in Mathematical Intelligencer, Vol. 15, No. 2, pages 54-55; Spring 1993.

FURTHER ANT-ICS:  TRAJECTORY OF GENERALIZED ANTS.  Jim Propp in Mathematical Intelligencer, Vol. 16, No. 1, pages 37-42; Winter 1994.


About the Author

Adrian Akison is a computer programmer and analyst for Cobe Renal Care in Lakewood, Colorado.  He has a degree in mathematics and economics from the University of Southern California.  In addition he is a graduate student and the University of Colorado.  He can be reached at:

Internet:	adrian.akison@cobe.com

CompuServe:	74521,103

USPS:	Cobe Renal Care

1185 Oak St.

Lakewood, CO  80203

Feel free to forward any comments or suggestions for improvement pertaining to the simulation or help file.