This page was automatically generated by NetLogo 3.0.2. Questions, problems? Contact feedback@ccl.northwestern.edu.
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.
Modified Langton's Ant
created with NetLogo
view/download model file: la.nlogo
WHAT IS IT?
-----------
This version of Langton's Ant has several customizable options. 1st the user adds the turtles to the arena, determining how many turtles, where they're placed, and what direction each faces. There is also an option to remove turtles. Moreover, the program may be run with turtles each using their own colors or with all turtles using white.
Because there may be multiple ants, the processing during each step is handled in stages: first, the next step of each ant is determined, based on the arena's current environmental conditions; then each ant performs its move. This way, as each ant makes its move, it's based solely on the current arena (like the Game of Life) and not affected by another ant's next move. The accuracy of this program modification is testable by placing two or more ants in the same place with the same heading. When Go is pressed, they will move in unison.
HOW IT WORKS
------------
Basic Langton's Ant Rules
On each step, each ant does 3 simple things:
Move forward one step
If it is on a black square, change the color and turn left,
otherwise change the color to black and turn right.
Since this version allows multiple ants, the program was designed to ensure that during each step all ants make their decisions about their next moves before any ants alter the environment.
HOW TO USE IT
-------------
Clear Arena removes all ants and all colors.
Add Ants: while this button is depressed, any click of the mouse on the arena will create a new ant in that position with the heading displayed on the slider New_Ant_Heading. To help choose specific coordinates, the mouse location coordinates (Mouse X and Mouse Y) are displayed while the Add Ants button is depressed.
Remove Ants: while this button is depressed, any click of the mouse on an ant will remove it.
Ants_Use_Their_Colors? determines whether the ants color the black squares white or with their own color.
Go repeats steps while depressed. The Number Of Steps increments for reference.
THINGS TO TRY
-------------
Place one ant on the screen with a heading of 120. Try again in another location - sometimes placing the ant close to the edge of the screen produces slightly different behavior.
Place two ants on the screen in the same location with opposite headings, such as 0 and 180. Have the ants use their colors.
Place four ants in the arena, one in each corner, the top two with a heading of 0 and the bottom two with a heading of 180.
Place two ants on the screen near one another, one with 0 heading and one with a heading of 180.
EXTENDING THE MODEL
-------------------
When ant behavior crosses the screen wrap, the kinds of interactive behavior you get is dependant not only on # of ants, headings, and positions but also on the size and configuration of the screen (screen edge X, screen edge y, and patch size).
CREDITS AND REFERENCES
----------------------
Kathleen Maffei
kmaffei@brynmawr.edu