Your browser does not support HTML5 canvas.
You will not be able to run CelLab under this browser.

by Rudy Rucker and John Walker

Introduction (from the User Guide)

Cellular automata (CA) are self-generating computer graphics movies. The most important near-term application of cellular automata will be to commercial computer graphics; in five years you won't be able to watch television for an hour without seeing some kind of CA. Three other key applications of cellular automata will be simulation of biological systems (artificial life), simulation of physical phenomena (heat-flow and turbulence), and the design of massively parallel computers.

Most of the programs in the Rudy Rucker Cellular Automata Lab are two-dimensional. In these programs the computer screen is divided into “cells”, which are colored rectangles or dots. Each cell is repeatedly “updated” by changing its color to a new color. The net effect of the individual updates is that you see an ever-evolving sequence of screens. A graphics program of this nature is specifically called a cellular automaton when it is 1) parallel, 2) local, and 3) homogeneous.

(1) Parallelism means that the individual cell updates are performed independently. That is, we think of all of the updates being done at once. (Strictly speaking, your computer only updates one cell at a time, but we use a buffer to store the new cell values until a whole screen's worth has been computed to refresh the display.)

(2) Locality means that when a cell is updated, its new color value is based solely on the old color values of the cell and of its nearest neighbors.

(3) Homogeneity means that all cells are updated according to the same rules. Typically the color values of the cell and of its nearest eight neighbors are combined according to some logico-algebraic formula, or are used to locate an entry in a preset lookup table.

Cellular automata can act as good models for physical, biological, and sociological phenomena because each person, or cell, or small region of space “updates” itself independently (parallelism), basing its new state on the appearance of its immediate surroundings (locality) and on some generally shared laws of change (homogeneity).

As a simple example of a physical CA, imagine sitting at the edge of a swimming pool, stirring the water with your feet. Notice how quickly the pool's surface is updated. The “computation” is so fast because it is parallel: all the water molecules are computing at once. And how does a molecule compute? It reacts to forces from its neighbors (locality), in accordance with the laws of physics (homogeneity).

CelLab allows you to explore cellular automata on your own personal computer, using a simulator, WebCA, that runs within your Web browser, using its JavaScript and HTML5 facilities to provide a high-performance emulation of cellular automata. You can define your own rules by writing short programs in JavaScript or Java, create patterns of cells and color palettes, then run the rule and observe its evolution on the screen. We supply a wide variety of ready-to-run rules, simulating processes as varied as heat flow, diffusion of gases, annealing of metal, behavior of tubeworms on the ocean floor, chemical reactions, and ecosystems of artificial life. Complete source code for all of these rule definitions is included in both JavaScript and Java, allowing you to use our rule definitions as the point of departure for your own experiments.

Advanced users can customize WebCA by writing custom evaluators in JavaScript. Custom evaluators can extend the simulator to handle different kinds of neighborhoods and visible state in cells, and even continuous-valued automata. Sample evaluators are provided to demonstrate these capabilities.

Getting Started

The best introduction to WebCA is to watch the self-running demo, which will give you a taste of the kinds of cellular automata you can explore with WebCA and what they can do (the rules which appear in the demo are explained in the “Sample Rules” chapter of the manual). Then dive into the User Guide, where the first chapter is titled “Getting Started”. Or, if you're adventurous, simply plunge directly into WebCA and start exploring.

  CelLab User Guide

The CelLab user guide, a complete introduction to cellular automata and laboratory manual for exploring them using the WebCA software, is published on the World-Wide Web. Click the link above to display the table of contents of this on-line book.

  CelLab Development Kit

If you are interested in developing your own experiments for CelLab, you'll probably want to download the CelLab Development Kit. It contains all of the standard rule definitions (JavaScript, Java, and compiled rules), patterns, color palettes, evaluators, shows, and a collection of tools we used to create them. It's often easier, when developing a program, to start with a similar program and adapt it to your purposes than to begin with a blank sheet. The development kit includes a variety of programs you can use as starting points for your own work. All of these programs are in the public domain and may be used in any way without any restrictions whatsoever. Please see the README.txt file in the archive for details of the files it includes.

CelLab History

(A more detailed history of cellular automata appears in the CelLab User Guide.)

The first edition of CelLab was developed by Rudy Rucker and John Walker in 1988 and 1989 when both were working in the Autodesk research lab. The package was to be the first title in the “Autodesk Science Series”, which would use computer simulation to explore aspects of science and mathematics. The product was first shipped in June of 1989 at a suggested retail price of US$59.95, under the name Rudy Rucker's Cellular Automata Laboratory. Rudy went on to complete the second title in the Science Series, James Gleick's CHAOS — The Software which used programs developed by Rudy and another Autodesk programmer, Josh Gordon, to illustrate aspects of James Gleick's bestselling book. CHAOS — The Software shipped in November of 1989. Rudy was working on the third title in the series, Artificial Life Lab, and John was developing the fourth, Home Planet, when Autodesk's management decided to close the research lab and terminate development of the Science Series. Rudy finished Artificial Life Lab, which was published as a book plus disk by The Waite Group Press in 1993. John released Home Planet as a freeware program in the same year, and the current version can be downloaded from this site.

The demise of the Science Series orphaned Cellular Automata Laboratory, which disappeared from the market in 1994. Rudy and John explored the idea of a new edition with several publishers, but none seemed to be interested. With the advent of the World-Wide Web, software can be distributed at a minuscule fraction of the cost of packaged software in the 1980's, so this seemed a natural way to get Cellular Automata Laboratory back into the hands of creative people interested in exploring massively parallel computing. Re-launching a program developed almost a decade ago required a modicum of work: a new cellular automata simulator that ran under Windows was developed, the User Guide (originally a 265 page book typeset using LaTeX) was transformed into an HTML document for the Web, and Java was added to the languages one can use to define cellular automata rules, being ever so much more with-it than Pascal, BASIC, and C. The Web edition of CelLab was released in 1995, and attracted an audience of dozens of enthusiastic users.

Eventually, as is so often the fate of software developed for closed, proprietary platforms, the MS-DOS and 16-bit Windows programs developed for CelLab stopped working on “improved” versions of Microsoft operating systems—death by Microsoft. Updating them to work on current versions of Windows would amount to almost a complete re-write, and that would only be jumping back onto the treadmill of constantly revising them for each successive release from the masters of strategic incompatibility. Further, it would limit the audience for the programs to users of a legacy, technologically inferior platform which is continually losing market share to better alternatives. (If you'd like to visit CelLab Classic, go right ahead—we never delete anything—but you're unlikely to find a machine which will run it.)

In 2017, John had converted a number of resources on his Fourmilab site to replace applets written in the Java language, which is rapidly being abandoned as a means to develop interactive Web pages, with the native facilities of HTML5 and JavaScript, which are standards supported by most modern Web browsers on both desktop and mobile platforms. By running entirely within the browser, there is no need for the user to download or install any software on their own machine, nor any worry about that software becoming incompatible with future operating systems the user might install. A Web-based application will run on any machine or operating system on which a standards-compliant browser is available, and that's just about all of them.

The question was, would JavaScript and HTML5 canvas graphics support be fast enough to run the very demanding computation and graphics support which CelLab required? When it was originally written in 1988 and 1989, CelLab required every assembly language trick and tweak in the twisted minds of clever programmers to squeeze out around one generation per second from an IBM PC/AT (a 6 MHz 80286 machine), but in the intervening years, typical personal computers, including mobile platforms, have become around five hundred times faster. That can make up for a lot of inefficiency in programming language implementations. A prototype was built, and the results were stunning: without resorting to any off-the-deep-end tricks or techniques which might risk incompatibility, JavaScript and HTML5 could deliver stunning performance: up to 100 generations per second for most cellular automata rules on a modest laptop computer with no special graphics hardware.

Several months later, WebCA is the result. It runs all of the rules which the original MS-DOS and Windows graphics mode cellular automata simulators ran, and many new rules have been added. It is compatible with compiled rule definitions, patterns, and color palette files used by the earlier programs. (User evaluators [“own code”], which were written in 80x86 assembly language or as Windows DLLs are not compatible, but all of the user evaluators included with the earlier programs have been re-written in JavaScript and work compatibly with the earlier implementations.) Besides running in the browser on a multitude of platforms, the other major innovation in WebCA is that rule definition programs and custom user evaluators can be written in JavaScript, supported directly inside the browser, and do not require users to install a separate development environment for a programming language such as C, Pascal, Basic, or Java. (The ability to define rules in Java and compile them into rule files has been retained, but there is no need to use it—it is no more efficient than JavaScript.) Now, to explore cellular automata on your own, you need nothing more than a rudimentary text editor (such as the “notepad” programs included with all operating systems) and your Web browser.

So now it's finished, or at least at large once again. Ideally, CelLab will never be done, not as long as folks continue to use it to explore the world of cellular automata and share their discoveries with other pioneers on this frontier of computing.

Programmers interested in how WebCA works and its development history may consult the Development Log, where all changes to the software are documented.

About the Authors

Rudy Rucker, the author of thirty books of science-fiction, popular science and mathematics, and computing, is Professor Emeritus of Mathematics and Computer Science at San Jose State University. John Walker is founder and former president of Autodesk, Inc. Autodesk's best-known product is a computer-aided design (CAD) graphics program called AutoCAD.


Rule program:

Fourmilab home page