AutomaLab by Michael Creutz Physics Department Brookhaven National Laboratory Upton, NY 11973 creutz@wind.phy.bnl.gov 9 September 1991 This program and source is freely distributable. Play God over your own universe. With AutomaLab you control the microphysics of a discrete world of cellular automata. This two-dimensional land is an array of 192 by 180 cells displayed as pixels on the Amiga screen. Each cell can be alive or empty, with evolution occurring in discrete time steps. Empty cells are black, newborn ones are yellow, older living ones are red, and cells that have just died are magenta. In one time step, the fate of each cell depends on the number of living neighbors. Using Boolean gadgets, you control when a new live cell will be born on an empty site and when a living one will survive. Another gadget determines whether the cells count only their four nearest neighbors or also include the nearest cells in the diagonal direction, for a total of eight neighbors. With menu selections you determine whether the boundary of your universe is dead, alive, or periodic. There is also a menu controlling the size of the cells. The speed, pause, and clear gadgets should be self explanatory. You can also sketch and kill cells by pressing the left mouse button over your world. There are 2^18=262,144 possible rules with the eight neighborhood, and 2^10=1,024 more with the four cell neighborhood. Indeed, it is unlikely that you will be able to try them all. In addition, the number of possible universes is further doubled using the "Xpast" gadget, which probably needs some explanation. When this is activated, the new state is finally XOR'ed with the history one time step back. Thus if a cell was alive in the past, the new state is the opposite of what the birth and survivor gadgets want. The reason for doing this is to produce reversable rules. If the history and current states are interchanged, the system will go backwards through the sequence of configurations from which it came. An analogy is reversing all the momenta of a bunch of atoms. This interchange is accomplished by the "Rev." gadget, which interchanges young and moribund cells. Without the Xpast gadget set, the Rev. gadget is boring, it only delays things one time step. If this seems confusing, try this: With the Xpast gadget set, clear the screen, draw some small picture, select a random rule from the birth and survivor gadgets, and let the system evolve until the screen becomes a mess. Then hit the Rev. button and watch the initial picture reappear. The program starts out with Conway's classic cellular automaton model "life." Here a new cell is born for exactly three neighbors, while a living cell dies with less than 2 (lonely) or more than 4 (overcrowding) neighbors. Another well-known rule is Fredkin's modulo two model which uses the 4 cell neighborhood. Here a state flips if it has an odd number of active neighbors and is unchanged otherwise. Start with some small picture and observe how the initial state is replicated. The program is written in C and compiles with PDC. It uses direct access to the blitter for speed, but should multitask with no problem. An earlier version was published in the May 1991 issue of Jumpdisk. Following their liberal policy on program ownership, I now make it freely distributable. The main additions to that version are a custom pointer, variable block size, and the ability to XOR with the past.