Instructions for

The HandCraftCA Applet

If you don't already know about cellular automata (CA's), you should read the previous page, which is a general introduction. This page describes an applet called HandCraftCA, which you can use to experiment with CA's that have three states and in which each cell has three neighbors, including itself.

Since they use three states and three neighbors, the CA's that you will be working with have 27 rules. (That's 3 raised to the power 3.) Each rule corresponds to some combination of states in a cell and in its left and right neighbors. The rule specifies what the new state of the cell will be in the next generation. When you use the HandCraftCA applet, you get to select the new state in any of the 27 rules, and you get to see how the resulting CA behaves.

The applet is arranged like this:

An outline view of the HandCraftCA applet

Here is some information about each of the parts of the applet:

Rules Panel: The top section shows the rules. Just click on a rule to change its specified new state. When the applet first starts, the rules are assigned randomly.

Small-cell CA: Below the rules, on the right, is a rectangle showing a cellular automaton that uses those rules. When the applet starts up, an initial "world" is created and shown at the top of the rectangle. The cells in this world are assingned states at random. The cells are quite small; each one occupies a single pixel. The CA simply runs continuously, computing new generations of the world and displaying them. When you change one of the rules, the change will affect the next generation and the generations that come after that. (Previous generations will not be recomputed, however.)

Big-cell CA Below the rules, on the left, is a rectangle showing several generations of another CA, which uses the same rule. In this case, the cells are rather large so you can see them better, individually. Again, the first generation of cells is created at random and displayed at the top of the rectangle. The next few generations are displayed below it, but just enough to fill the rectangle. When you change a rule, all the generations are recomputed and redisplayed immediately.

You can also change the state of one of the cells at the top of this rectangle. Just click on the cell you want to change. Any resulting changes in later generations are computed and displayed.

Try pointing the mouse at one of the cells below the first row. That cell and the three cells above it will be outlined in yellow. The three outlined cells in the row above are the ones that were used to compute the state of the cell that you are pointing at. Furthermore, in the rules panel, the rule that was used to compute the state of the cell will also be hilited. This might help you understand how the computation was done. (It can also help you quickly locate a rule that you want to change.)

Control Buttons: Finally, at the bottom of the screen, you will see a line of control buttons. The "New" button will create a new random initial world for the Big-cell CA. The ">>" button will create a new initial world for the Small-cell CA by copying the initial world of the Big-cell CA. The cells from the Big-cell CA are copied into the center of the Small-cell CA's world, and the rest of the cells are filled in in black. The ">>>" button does something similar, except that it repeats the pattern of cells from the Small-cell CA to completely fill the Big-cell CA's world. The "Random" button creates a new random initial world for the Small-cell CA. And finally, the "Restart" button will restart the Big-cell CA from whatever initial world was set up for it most recently.

The HandCradftCA applet itself is on the next page.

[Index] [Previous] [Next] [HandCraftCA Applet] [EdgeOfChaos Applet, Version 1] [EdgeOfChaos Applet, Version 2] [Eck's Java Page]

David J. Eck
Department of Mathematics and Computer Science
Hobart and William Smith Colleges
Geneva, NY 14456