CS 272
Homework 1, Part 1
Jason Rohrer
Due January 8, 2002

subreal[cellular]:

A Message-passing Cellular Automata System in 3D

0. System history

subreal is a system that I have designed and implemented to explore multi-agent distributed evolution. All design of the local system (except for a polished user interface) is finished. I am currently working on protocols for transferring cells between connected nodes in a distributed network.

1. System description

1.1. The grid

The grid consists of a 3D box packed with cubic grid spaces (e.g, a 20x20x10 grid of cubic spaces). Each space can be occupied by at most one cell. Each vertical column of grid spaces is associated with an integer value that indicates the height of the floor for that column. Grid spaces below the floor in a given column are off limits and may not be occupied by cells. A floor value of zero indicates that the entire column of grid spaces is in bounds. Floor values that differ from column to column allow for any discretized surface to be used for the floor of the grid (i.e., a mesh with hills and valleys).

Each column is also associated with a floating-point value W, which indicates how much water is available per time step to a cell touching the floor in that column.

1.3. The cells

Each grid space is either empty or occupied by a single cell. A cell cannot move actively between grid spaces, though it can fall down within its column if the cell supporting it are removed. Each cell contains a control structure that regulates all of its variable parameters, effectively regulating the behavior of the cell. The control structure is very general, but its detailed description is beyond the scope of this document.

1.4. Cell IO

Cells are six-sided entities. Each cell can receive various inputs and transmit various outputs on each of its sides. There are two different types of input/output (IO) that a cell can participate in, resource IO and signal IO.

Resource IO transfers resources between cells. Available resources for output from a cell water and chemical energy. Available resources for input from a cell are water, chemical energy, and solar energy. Water and chemical energy are stored by a cell, but solar energy cannot be. Whenever solar energy is received by a cell, it is combined with as much water as is stored in the cell to produce chemical energy. If there is not enough water available to process the inbound solar energy, the excess energy is lost. Any excess water remains stored in the cell.

Cells can receive water from the environment (the floor) or from other cells. They can only receive chemical energy from other cells, and they can only receive solar energy from the environment. Cells that are blocked from above by another cell receive no solar energy.

Signal IO takes the form of three separate signal channels per cell side. Each signal channel can take on an arbitrary floating point value during each time step. Signal IO uses no cell energy.

Additionally, cells have a variable adhesion parameter for each side. If the adhesion between adjacent cells is strong enough, their bond can defy gravity, supporting one of the cells even if it has an empty space below it in the grid.

For a diagram of cell IO, see Figure 1.


Figure 1: a subreal[cellular] cell with input/output channels. Note that each side of a cell has a distinct set of IO channels, one of each IO type.

1.5. Spawning new cells

If a grid space adjacent to a cell is empty, the cell may spawn a new cell into the empty space. There are two kinds of cells that can be spawned: replicas and sex cells. If an adjacent space already contains a sex cell, a new sex cell may be spawned into the space (the two cells will be combined as described below).

Replica cells include a complete, but partially mutated, copy of the original cell's control structure. The original cell chooses how much water and chemical energy to impart on the replicated cell--it loses whatever resources it gives to its offspring. The replica begins functioning as a full-fledged cell one timestep after its creation.

Sex cells include half of the control structure (again, partially mutated) of the original cell. Producing a sex cell consumes a fixed, though substantial, amount of the original cell's energy, though it consumes no water. A sex cell remains completely inactive until it encounters another sex cell, at which point it combines with the other sex cell to produce a full-fledged cell that begins functioning during the next time step. The control structure of the offspring is a 50/50 hybrid of the mutated parental control structures.

1.6. The passage of time

subreal[cellular] uses a discretized time system. During each time step, every cell in the grid is updated. During a step, a cell consumes a fixed amount of chemical energy. If a cell runs out of chemical energy, it "dies" and is removed from the grid. All IO transmissions occur within a single timestep, as do the two cell-spawning operations.

1.7. The user interface

subreal[cellular] can be manipulated by a user through a 3D interface implemented using OpenGL. The user can navigate the grid using five degrees of freedom. Sliders are provided for controlling various parameters. A "cell picker" tool can be used to save cells in the grid to a "specimen jar". Copies of specimen cells can be inserted into the grid at any empty floor space. Thus, users can select cells with interesting behaviors and test them in a variety of environment and neighbor situations. For a screen shot of the user interface, see Figure 2.

Figure 2: the subreal[cellular] user interface.

2. Games

Cells in subreal can compete in many different kinds of games. Some of the most interesting games require cooperation for survival. Cells are individual entities and completely separate from other cells in the grid, but joining a cooperative relationship with other cells (i.e., forming organisms) can increase their chances of long-term survival. One such game requiring cooperation is described below.

Suppose that cell A is situated over a floor space with an abundant water supply, but that neighboring cell B is over a space that is completely dry. Further, assume cell C, a non-cooperating cell (perhaps a cell from another organism) is above cell A, blocking A's supply of solar energy, but that cell B is not blocked from above and receives plenty of solar energy.

Neither cell A nor cell B can manufacture necessary chemical energy in isolation: cell A has no solar energy, and cell B has no water. Cell A's only chance of survival is to pass water to cell B and hope that cell B will pass some of its manufactured energy back. A can hoard its water supply, but water alone does A no good.

Of course, cell B maximizes its short term gain of energy by consuming water provided by A but passing none of its manufactured energy back to A. When B uses this strategy, however, A will eventually run out of energy and die. A's death leaves B stranded with no water supply, so B will die shortly after A. B's only chance of long-term survival is to participate in a cooperative relationship with A. For a diagram of the situation that fosters this game, see Figure 3.


Figure 3: a game played between cells A and B. Cell C does not participate and serves only to block A's inbound solar energy..

References

The subreal website: http://subreal.sourceforge.net

A subreal[cellular] download for Linux X86: http://subreal.sourceforge.net/downloads/subrealCellular.tar.gz