Langton's Ant Applet
The use of this applet should be fairly self explanitory. The square grid described in the introduction is simply a collection of pixels on the screen. Thus the ant is as tiny as one of those pixels (which explains why you can't see it)
Click on the box containing a color to have the ant turn left instead of right at a square of that color or vice versa. Click add a color to add an additional color to the number of possible colors a square can be and click remove a color to reduce the number of colors a square can be by one. Whenever any of these buttons are pressed, the grid is reset to all black and the ant is returned to the middle with its original orientation. The reset button only resets the grid an returns the ant the center and its original orientation but does not affect the number of colors.
Most of the computers time when running this applet will be spent updating the images of the ants grid you see to the screen. Therefore there is a bar on the right which controls how often these updates occur. By placing the line near the top of the screen, the changes to the grid will become more smooth but the ant will move slower and by placing the line near the bottom, changes will be less frequent and so differences between frames will be more drastic, however the ant will move faster.
View the Source Code to the applet above
Related Research Interests
View an ant constuct a spiral: Langston's ant with more directions