Tutorials/General technology
So now, after coming across a good cellular automata, you have decided to do something less abstract with it — something more significant than random soup searching and more engaging than automatic software searching. Then you begin to consider signal circuitry, the very connection between microscopic evolution and macroscopic construction. (Actually, that is approximately what cellular automata were originally created for; the basis of modelling self-replicating systems.)
Contents
- 1 What is a signal and what do they do?
- 2 How to find these building blocks?
- 2.1 Example 1: Conway's Game of Life, with the Gosper glider gun
- 2.1.1 The signal: glider
- 2.1.2 The signal sink: eater 1
- 2.1.3 The signal source: Gosper glider gun
- 2.1.4 Signal interactions: glider collisions
- 2.1.5 Signal reflectors
- 2.1.6 Signal inverter/NOT gate/AND (NOT) gate
- 2.1.7 OR gate
- 2.1.8 Signal duplicator/fanout and memory storage
- 2.1.9 Exercise: XOR gate and AND gate
- 2.1.10 Scope
- 2.2 Example 2: Banks-I, with the wire
- 2.3 Example 3: B2a/S, with the replicator
- 2.4 Example 4: Live Free or Die, with the puffers and rakes
- 2.1 Example 1: Conway's Game of Life, with the Gosper glider gun
- 3 Summary
What is a signal and what do they do?
A signal is a moving configuration different from its background, and thus carrying some information from simple presence/absence to phase difference. In terms of cellular automata, the following patterns can serve as signals:
- Spaceships in an empty medium,
- Fuses, drifters and negative spaceships in some nonempty media, and
- Active reactions, particularly methuselahs, in conduits.
A signal travels through the space at a certain speed, which is an important measure since timing (especially synchronization) decides whether signal circuitry works or not.
Signals transform and interact in various ways. A lone signal can be created, reflected and/or flipped, delayed/advanced, multiplicated, transformed into other signal(s), or destroyed. Two or more signals can be synchronized, or subject to reactions that annihilate or perform logic operations. These rely on some devices, namely guns/factorys, reflectors, advancer, pulse dividers, fanouts, converters, eaters, Boolean logic gates, etc.
Note that signal circuitry in cellular automata is very different from that with other physical implementations. For instance, there is no law of mass conservation (i.e. population count is not fixed for many CAs) nor notion of potential difference in a force field.
How to find these building blocks?
Constructing signal circuitry involves both human idea and computer power. Here some simple demonstration may provide hints on how to do that.
Example 1: Conway's Game of Life, with the Gosper glider gun
The signal: glider
Imagine travelling back to the early life days in the 1970s. When tracking the evolution of small polyomino patterns, Life enthusiasts observed a moving configuration as follows:
Soon the spaceship became known as the glider, and found its part in the signal circuitry. Let's analyze its movement.
A glider travels one cell down and one cell right in four ticks, during which it shows two alternating shapes in a glide-symmetric manner. To reflect these facts we have some terminologies:
- Phase: the arrangement of cells in one tick. A glider has 4 phases.
- Period: the minimum number of ticks passed to appear in the same phase. A glider is period 4.
- Speed: the displacement in a period divided by period. A glider has speed (1,1)c/4.
- Mod: because the 1st&3rd phase are identical considering reflection and translation, and so does the 2nd&4th, a glider is said to have a mod of 4/2 = 2.
- Lane: the diagonal linear region where a travelling glider has covered or will cover. Since it is diagonal, a new metric for the distance parallel and perpendicular to the direction is invented. Define one half-diagonal (1hd) as the length of one half diagonal line of the square cell, that is, the distance between the blue line and the red line on the right. Two half-diagonals is a full-diagonal (1fd), and one half of a half-diagonal is a quarter-diagonal (1qd).
Additionally, we will need to define parity and color so as to describe the relationship between two gliders. Gliders in the 1st and 3rd phase (or 2nd and 4th, with pairwise identical shapes) are said to have the same parity. Gliders in the same phase up to rotation but no reflection are considered to have the same color if their corresponding cell coordinates have even sum (or odd sum).
The signal sink: eater 1
An important question following the discovery of glider is, what can we use when we want to suppress a glider? A number of collisions between a glider and some simple patterns have been tested. Fortunately, the following 7-cell fishhook-shaped still life can kill a glider and then recover in four ticks.
This is called an eater, a subgroup of catalysts. It is reusable, and it allows for gliders to be eaten at any time without adjusting phases.
The signal source: Gosper glider gun
Since the discovery of glider, people have been seeking for patterns that generates gliders. Later, a sustainable collision between two queen bees was discovered that could yield gliders again and again. This is known as the period-30 Gosper glider gun:
Generally, a signal device may take a number of inputs and yield some outputs. When there are more outputs than inputs, it is said to be an over-unity reaction. With assistance, this kind of reactions are useful for constructing signal emitters. Taking no inputs and giving outputs periodically, the Gosper glider gun can be considered a degenerate example of over-unity reaction.
The glider gun has a period of 30, making a stream of gliders with apparent gaps. Indeed, gliders can be packed more densely; the minimum separation is 14 ticks, as can be seen in the period-14 glider gun. However, attempts to put a glider somewhere so that it goes across the stream perpendicularly unaffected will fail. Actually, the period needs to be at least 38 for two glider streams in order to be permeable:
This fact motivates us to find higher-period glider guns. We can simply arrange two period-30 glider guns and see how the gliders interact.
Signal interactions: glider collisions
Next, we want to know how gliders can react with each other. Beginning with the simplest case of two gliders, we enumerated two-glider collisions. Of particular interest are the cases where two glider destroy each other completely:
These annihilation reactions will be the basis of signal devices below.
Also we observe the cases with clean output glider:
Looking closer, they are actually kickback reactions in which one of the gliders is reflected 180 degrees, which is somewhat limited. It would be better if there were two-glider collisions in Game of Life that
- give the output on a lane perpendicular to both of the inputs,
- kill one of the inputs while keeping the other unaffected, as in a Heisenburp-type fly-by deletion, or
- are clean unity or over-unity reactions themselves.
Yet, the 90-degree kickback reaction can be sometimes useful. In the following pattern, two gliders bounce back and forth between two period-30 streams of gliders, deleting every other glider and resulting the following glider gun:
(Note: the mechanism has an overall period of 120, but the output glider stream is period-60. We consider this as a pseudo-period 60 glider gun. )
The other 2-glider collisions are not clean, as they leave some debris after interaction. These may also increase the period of a glider stream; as an example, the following true-period p60 glider gun uses a block-making reaction.
Signal reflectors
Signals don't turn around themselves, so reflectors are needed to adjust their orientation. Generally, a signal reflector takes one input signal and gives one output in a different direction.
With two Gosper glider guns, a period-30 glider reflector can be constructed. The plan is
- When there is no glider input, the two guns should not emit any glider at all.
- When a third glider comes in, it suppresses one of the two gliders above, leaving another one escape.
Take the first 90-degree annihilation reaction above, and we can construct the following period-30 oscillator with guns in-phase:
Drop in a third glider so that it destroys one of the gun outputs:
That's it, a working 180-degree glider reflector! But with 180-degree reflectors only we cannot get a glider to wherever it needs to be. We will then look for a 90-degree reflector. Relocate the glider so that it destroys a gun output head-on rather than at right angles, which leads to the following two:
Why are both included here? Because we start to take color and parity into consideration. As stated above, the relationship between two gliders is described with the concepts of color and parity. As they are independent considerations, there is a total of 2 × 2 = 4 combinations of preserving and changing cases.
However, the color-changing/preserving and parity-changing/preserving considerations are actually insufficient for arbitrary glider timing adjustments. Suppose two 90-degree reflectors are combined into a flexible 180-degree reflector. By moving in or out the composite device by one full diagonal, the path length will be changed both on the outward lane and the inward lane, thereby advancing or delaying the glider by 4 × 2 = 8 ticks. A partial solution is to swap the two 90-degree reflectors when one is color-changing and the other is color-preserving; this changes the timing by 4 ticks. Yet, we still need to develop mechanisms at different mod-8 timings for a complete toolkit.
Another consideraion is called repeat time, or recovery time; it measures the temporal difference between two succesive signals that can be reflected successfully. As demonstrated below, one of the reflectors above has a repeat time of 60 generations.
Signal inverter/NOT gate/AND (NOT) gate
A Boolean logic NOT gate, or signal inverter, takes an input and gives an inverted output. When fed with a glider at certain timing, the device should not emit any glider; if no glider enters, it should emit gliders periodically. Such mechanism processes binary digital data, not analogue ones; it won't work if the glider's timing is incorrect.
It is easy to see that two-glider annihilation reactions is the key to inversion:
From this, it seems that a hole (vacancy site) among an intermittent stream of spaceships is similar to a single spaceship traversing the vacuum in terms of the signal carried. NOT is the most basic operation done to such a stream, and it does not destroy nor create information.
A related operation is AND (NOT), that is, a two-input AND gate with one of its inputs inversed first. We don't actually need a AND gate to do this, though; the following will work. There is an output glider if there is the northeast glider and not the northwest glider:
An eater absorbes the extra northwest glider in case it doesn't get annihilated.
OR gate
A Boolean logic OR gate takes two inputs and gives an output. When fed with at least a glider at certain timing, the device should emit a glider at the same timing. It is the inverse operation of NOR.
The simple fact that A NOR B = 1 AND ( NOT A ) AND ( NOT B ) allows for the construction:
Alternatively, a suitable three-glider annihilation can also work in place of two AND (NOT) gates.
Try disabling the northeast glider or the southwest one to see the effect.
Now that an OR gate (and of course a NOR gate) is ready, we may draw the conclusion that this signal circuitry is universal to the same extent as some other implementations of the well-known universal NOR logic — but wait a moment! There are some other issues.
Signal duplicator/fanout and memory storage
A signal duplicator takes an input and gives two outputs. It is the simplest case of a fanout (or a splitter), i.e. devices that increase the number of signals.
The period-60 glider gun above shows that a block-synthesizing reaction can consume two gliders in a row, performing NOT operation twice. Then apply NOT again and positive signals are emitted well:
This is essentially a way to retrieve information. One of the outputs can be circulated back to input:
What's special about this loop? It stores information and sends them repeatedly. By adjusting its memory we can make a stream of gliders distributed in, say, a ...1101000... sequence:
Exercise: XOR gate and AND gate
OR, XOR and AND are three symmetric two-input Boolean logic gates whose outputs are not trivially all 0's. When an XOR gate is fed with only one of the two gliders at certain timing, the device should emit a glider at the same timing; otherwise the output has no glider. An AND gate emits a glider iff both glider inputs are fed.
Building these gates is within NOR logic's capability, but can they be simpler? Sure! Now their construction is left to the reader as an exercise.
Hint: there is already an AND (NOT) gate. Another hint: a key XOR reaction is
Scope
We have demonstrated the signal circuitry technology with gliders, eaters and period-30 Gosper glider guns. Its diverse possibility with simple components has attracted Life enthusiasts since inception, applications of which goes from a Rule 110 unit cell to pulsar pixel raster line display and Remini self-constructing puffer. Further discussion on the forums can be found here and here.
There is lots of room for future advancement.
- About the signal: we have used gliders only, going at a fixed direction and speed. However, there are also other signal carriers such as the period-4 c/2 orthogonal spaceships LWSS, MWSS and HWSS, the perturbation in a diagonal 2c/3 wire, and even methuselahs Herschel, B-heptomino, etc. In some cases information transmission and interaction may be better with some of them.
- About the signal devices:
- Their bounding box cannot be ignored. Sometimes it may be too bulky, in particular the clearance may be poor in some direction, so that it needs compactifying.
- Their timing should be treated carefully. When shifting a period-30 device so that input glider path lengthens by, say, N full-diagonals, the phase of the device should be delayed by 4N ticks at the same time, which is inconvenient. Stable circuitry has only one phase, so they do not need to be adjusted.
- Their mechanism can be more diverse.
- The inner workings of a Gosper glider gun has not been discussed above, instead it is used as a whole. As a result we missed things like an inline inverter and the following duplicator.
- Other patterns with period being a factor of 30 (i.e. p15 pentadecathlon, p3 bumper and p5 bumper) or a multiple of 30 (i.e. p120 Simkin glider gun) exist, and they no doubt can be incorporated in period-30 technology. Even period-1 still lifes can be employed; we missed another small duplicator using a block mentioned in the fanout article.
- Can transient (unstable, short-lived) patterns play a part? Yes! As a glider can be reflected by dying sparks, as shown below with duoplet and banana spark, there could be a larger class of reflectors (e.g. a buckaroo), hopefully completing the mod-8 timing toolkit requirement above.
- The constructions so far, or rather, drawing and copy&pasting, have been done manually. For a self-replicating system (like the aforementioned Remini), everything has to be built by the pattern itself. This is far beyond the scope of this way too basic tutorial, though; more knowledge about building a seed and using a professional program is required.
In the following sections, we will briefly see how signal circuitry can be developed in other cellular automata without the familiar glider. Prerequisities including signal and its source & sink are in fact easy to satisfy for many rules.
Example 2: Banks-I, with the wire
- Also see: Introduction to Banks-I
Banks-I is an isotropic non-totalistic Life-like cellular automaton for which investigation began in the infant of Game of Life. It was proposed as a CA modelling a general-purpose computer. In this rule, a "wire" consists of a three-cell-thick block of live cells, and a "signal" is carried by a duoplet-shaped perturbation travelling at lightspeed along the edge of a wire. A five-cell bump extension and an additional cell on the edge can kill a signal.
Signals can be emitted at regular intervals with a period-2N "clock", or in essence, signal factories. In addition there is a fanout wire junction and a 90-degree reflector.
Example 3: B2a/S, with the replicator
B2a/S is also an isotropic non-totalistic Life-like cellular automaton, but with only one birth transition. It is characterized by the only moving and growing configuration, the domino replicator, that messes up every random pattern:
However, the replicator can be tamed by itself. Thus, four such replicators form a stable period-4 oscillator:
Two copies of this loop bounds another replicator, making a period-64 shuttle:
A column of these shuttles at adequate spatial and time offsets serves as the railway for another replicator to run in a single direction:
That's it, a signal! Elaboration on the scheme is up to the reader.
Example 4: Live Free or Die, with the puffers and rakes
Live Free or Die (B2/S0) is an explosive rule. There are small spaceships and puffers and rakes; with several reactions such as catch and throw, fly-by deletion and reanimation, a Rule 110 simulator has come to life. In-depth analysis is also up to the reader.
Summary
Be innovative!