Miscellaneous topics in Conway's Game of Life -- unfinished projects of all kinds and conditions

20 September 2005

Some ideas for a p8 or pure-stable Unit Life Cell

I've been looking a little bit at rebuilding David Bell's Unit Life Cell using p4/p8 glider and Herschel technology. The point would be to produce a unitcell with a period that's a power of two, to work more efficiently with hashlife/qlife algorithms. The p30 mechanisms in the current unitcell mean that hashlife has to add 15 different phases to its hash table before it has them all (I think). Also, I was wondering if it might not be possible to squash the necessary p8 circuitry into a 256x256 area -- or [much more likely!] into a 256x512 area, which hashlife could handle just about as well. The idea is to optimize the design for simulation by the new hashlife-based player/editor, Golly:


I think the Life-logic circuitry can be simplified considerably if the neighbor-count chute is modified a bit; in particular, if the stream of gliders that reads the contents of the chute is slowed down to (let's say) p64, then it's possible to check that either the #2 or the #3 neighbor-count glider is the first one out of the chute -- and then suppress the #2 neighbor-count glider with a negated cell-is-ON signal.

With a long-enough gap between gliders, Herschel-based switches can allow just the first glider of a stream to get through, then automatically reset itself afterwards. Here's one such circuit that works at p64:

Okay, now imagine a Unit Life Cell with no moving parts. An infinite grid of OFF unitcells will just sit there; it takes three appropriately-timed gliders from neighboring unitcells to activate a given cell, and then it stays activated only as long as two or three gliders keep coming in to sustain it.

A glider at some critical spot still means the unitcell is ON, and the lack of that glider means that it's OFF.

As in the p8 case, the fanout device is simple to construct with Herschel circuitry -- it could be a standard G->H converter (fairly compact at p8, but not too bad even at p1) followed by a string of glider-producing conduits:

Then the trouble starts. If the unitcell can't have any moving parts, there can't be a "timing gun" in it saying when to look for gliders from neighboring cells. So we have to always produce a "timing" signal at exactly the same time no matter which gliders come in from neighboring cells -- one glider, two gliders, eight gliders.

I have the feeling that I'm not being clever enough, but the best design I can think of at the moment is a string of eight circuits like the following sample pattern, each hooked up to an input glider from a neighboring cell:

Then you also have to actually count the number of signals from neighboring cells. Luckily the above pattern has a spare output glider for each input signal, and these could be collected into a single lane with standard stable reflectors and sent through a counting mechanism. Here's one possibility:

#C ladder from programmable constructor --
#C could be used as a configurable neighbor-counting mechanism
x = 424, y = 465, rule = B3/S23

Because there's a separate output for each possible neighbor count (if the ladder were extended to eight "rungs") it's possible to add eaters to block off outputs corresponding to any standard Bnnn.../Snnn... rule. The remaining outputs would be collected into a single lane with standard stable reflectors, as before -- the ladder would be set up so that there's at most one output glider for any neighbor-count (and either an ON or OFF cell-state signal, which suppresses either the S or B part of the ladder's output signal.)

The size of the ladder means that 512^2 is probably too small to hold the entire stable pattern -- but the next larger power of two, 1024^2, should be plenty big enough. And it should be relatively easy to adjust the period of the cell to a power of two, as well: probably p8192.

19 September 2005

David Bell's Unit Life Cell adjusted to 512^2

There's a new cross-platform open-source Life editor in the works -- and an insurmountable opportunity came up recently in the "golly-test" discussion list. Brice Due had constructed several patterns made up of "unit Life cells", which are large Life logic circuit configurations that mimic the behavior of single Life cells. Thus a single infinite Life universe can support an infinite regress of unitcells simulating unitcells simulating unitcells, at exponentially slower speeds. (See also Jared Prince's "Deep Cell".)

As it turns out, the timing guns in David Bell's original 500x500 Unit Life Cell are a good bit slower than they need to be, so there's still plenty of time for signals to arrive from neighboring 512-size cells, even though they have a little farther to travel. So the biggest headache was resynchronizing a lot of p30 circuitry; stretching each unitcell by 12 cells added multiples of 48 ticks to the glider paths. [If only the magic number had been 515 instead of 512, I would hardly have had to resynchronize anything at all...]

Unit Life Cell diagramThe "circuit diagram" for the original Unit Life Cell is shown at right: the area is 499^2 cells (and you need a one-cell-wide space between adjacent cells).

I didn't include a trail for the reaction for an OFF cell with two neighbors, which makes use of the isolated pentadecathlon at the left -- the #2 neighbor-count glider bounces back and annihilates what would otherwise be the ON output glider generated by the #3 neighbor-count glider. (I think.)

I had to make surprisingly few changes to expand the above to a 511^2 cell -- basically, just a gun and a few reflectors in the lower left corner had to be moved southwest, and then the gun, the counting chute, and all the reflectors leading to it needed to be rephased to match the new timing of the gliders from neighboring cells.

Here's the RLE for a single 511^2 Unit Life Cell.

-- And here's the RLE for a 3x3 test grid representing a blinker, with the Xlife version here.

Coincidentally, I had to switch to RLE in the unitcell #B definition -- it looks like the current version of Xlife can't quite handle picture-format subpatterns at width 512, so my 3x3 grid was getting corrupted. I included the #M prefix in the RLE header, so Achim's Xlife 3.6 should be able to handle the above pattern. I have a private build (3.5.2. going on 3.5.3) that can handle RLE subpatterns with or without the non-standard Xlife-style #M tags, but that change hasn't spread very far yet...


It wouldn't be an impossibly difficult task to adjust the unitcell period to be a power of 2 as well: after David Bell designed and built the original Unit Life Cell, a p8N glider reflector was discovered, comparable in size to the p30N reflector used in the current unitcell. (Unlike p30, p8 would be compatible with power-of-two step sizes between generations, which would match the way Golly's underlying 'hlife' algorithm works with Life patterns.]

However, so far I am successfully resisting that project: since the fanout device and the glider-to-block converters (and the rest of the neighbor-counting logic) are irrecoverably p30, they'd all have to be replaced with p8 equivalents -- and offhand I don't know of a p8 glider-to-block converter or a small alternate glider reflector equivalent to the two-p30-gun reflector used to get gliders onto the other square color. Easy enough to arrange a new Herschel-based fanout device so no alternate reflectors are needed, though --

Rather than work on a p8-reflector-based version, I'd be tempted to find a pure-stable solution: the advantage would be that any cells that are not ON have no moving parts whatsoever! Which would probably increase the simulation speed, and might also make it easier to see the active cells in a large pattern of unitcells. I think I have all the pieces for a pure-stable Unit Life Cell worked out in my head now (see the next posting)... and they are even easy to reconfigure for any standard rule. Well, any non-B0 rule at least -- otherwise I need a clock gun in each cell.