This is one of my favorite topics and wikipedia pages! Please forgive my wall of text, and inscrutable ascii graphics, and check out the Buckley paper for better illustrations.
Here's some JavaScript code that implements (and describes) John von Neuman's 29 state cellular automata machine. I based it on some older "jvn" C code by R. Nobili, U. Pesavento, and Umberto Pesavento I found on the net, but I have rewritten it to be more symbolic and self documenting, so I could understand it better.
What it really needs is a specialized set of rule-specific editing tools and templates to stamp down, since it's impossibly tedious to paint anything non-trivial with the CA painting tools that this version of CAM6 currently supports.
https://github.com/SimHacker/CAM6/blob/master/javascript/CAM...
I've tried to document what everything means and describe how it works. With evocative function names and comments like "pointedToByExcitedOrdinaryOrSpecial" (Return 1 if pointed by an excited transmission state (ordinary or special), else returns 0) and "wellFlankedByExcitedNotNextExcitedConfluent" (Return 1 if well flanked by an excited (not next excited) confluent state, else returns 0)! ;)
For example, here are the bit sequences for constructing new cells. You can send these sequences of bits down a wire to an arrow pointing into an empty space, and it will construct the corresponding cell in that empty space -- the intermediate construction states are called "Sensitized", and they huffman-encode all the possible cells you can create. Note that you can only construct non-excited cells. (See Buckley, page 457, The mechanisms of construction, below.)
// Instructions to the jvn29 construction arm, whose tip
// is an arrow pointing into an unexcited state, that
// creates a sensitized state which evolves into other
// states over time, given the following excitement inputs.
constructionInstructions: {
OR: '10000', // => S S0 S00 S000 OR
OU: '10001', // => S S0 S00 S000 OU
OL: '1001', // => S S0 S00 OL
OD: '1010', // => S S0 S01 OD
SR: '1011', // => S S0 S01 SR
SU: '1100', // => S S1 S10 SU
SL: '1101', // => S S1 S10 SL
SD: '1110', // => S S1 S11 SD
C00: '1111' // => S S1 S11 C00
},
Here is the table of all the possible cell values, symbols and names (which is useful for an editor's user interface):
// Array of dicts describing cell values for jvn29.
cellStates: [
{ symbol: 'U', value: 0x00, name: 'Unexcited' },
{ symbol: 'S', value: 0x01, name: 'Sensitized' },
{ symbol: 'S0', value: 0x02, name: 'Sensitized 0' },
{ symbol: 'S1', value: 0x03, name: 'Sensitized 1' },
{ symbol: 'S00', value: 0x04, name: 'Sensitized 00' },
{ symbol: 'S01', value: 0x05, name: 'Sensitized 01' },
{ symbol: 'S10', value: 0x06, name: 'Sensitized 10' },
{ symbol: 'S11', value: 0x07, name: 'Sensitized 11' },
{ symbol: 'S000', value: 0x08, name: 'Sensitized 000' },
{ symbol: 'C00', value: 0x10, name: 'Confluent 00' },
{ symbol: 'C10', value: 0x11, name: 'Confluent 10' },
{ symbol: 'C01', value: 0x90, name: 'Confluent 01' },
{ symbol: 'C11', value: 0x91, name: 'Confluent 11' },
{ symbol: 'OR', value: 0x20, name: 'Ordinary Right' },
{ symbol: 'OU', value: 0x21, name: 'Ordinary Up' },
{ symbol: 'OL', value: 0x22, name: 'Ordinary Left' },
{ symbol: 'OD', value: 0x23, name: 'Ordinary Down' },
{ symbol: 'SR', value: 0x40, name: 'Special Right' },
{ symbol: 'SU', value: 0x41, name: 'Special Up' },
{ symbol: 'SL', value: 0x42, name: 'Special Left' },
{ symbol: 'SD', value: 0x43, name: 'Special Down' },
{ symbol: 'ORX', value: 0xa0, name: 'Ordinary Right Excited' },
{ symbol: 'OUX', value: 0xa1, name: 'Ordinary Up Excited' },
{ symbol: 'OLX', value: 0xa2, name: 'Ordinary Left Excited' },
{ symbol: 'ODX', value: 0xa3, name: 'Ordinary Down Excited' },
{ symbol: 'SRX', value: 0xc0, name: 'Special Right Excited' },
{ symbol: 'SUX', value: 0xc1, name: 'Special Up Excited' },
{ symbol: 'SLX', value: 0xc2, name: 'Special Left Excited' },
{ symbol: 'SDX', value: 0xc3, name: 'Special Down Excited' }
],
I wrote an earlier version in OpenLaszlo that had some custom editing tools, but that requires Flash, and was on my old Drupal site that's not up any more. But here is the archive.org link and description (with a screen snapshot). I wasn't able to get the old Flash app to run though. The source code has some interesting initial condition configurations, that I'll try explain, and are described in more detail in a paper referenced on the Wikipedia page:
https://web.archive.org/web/20110720235050/https://www.donho...
John von Neumann's 29 state Cellular Automata Implemented in OpenLaszlo
Submitted by dhopkins on Sun, 2005-09-18 04:12. Cellular Automata Live Demos
For fun, and to learn OpenLaszlo, I implemented the classic 29 state self reproducing cellular automata, invented by John von Neumann.
The JavaScript and XML code is written with no thought to efficiency, just conceptual clarity and convenience of implementation. It can't run a lot of cells at once, but at least it's slow enough to watch it compute. Don't worry: there's not space for it to reproduce!
I've configured it with several interesting initial conditions, including several different approaches to signal crossing, and an exclusive-or gate.
It uses pie menus for editing the grid of cells.
Laszlo von Neumann Cellular Automata Demo
https://web.archive.org/web/20120319060434/http://www.donhop...
Laszlo von Neumann Cellular Automata Source Code in Laszlo
https://web.archive.org/web/20120319060340/http://www.donhop...
Here are some of the most interesting initial configurations: all different ways to perform signal crossing. Signal crossing is difficult with this rule, which doesn't directly support it, so you have to "emulate it in software" with multi-celled machines or "organs". Here are a few different ways of dealing with signal crossing, each with their own problems and limitations.
Buckley's paper about these gadgets is called "Signal crossing solutions in von Neumann self-replicating cellular automata". The Wikipedia page discusses some of it and links to the paper, but the link is broken. So here is the paper about it on archive.org, on page 453:
https://web.archive.org/web/20081209155223/https://uncomp.uw...
or (faster download):
https://donhopkins.com/home/documents/automata2008reducedsiz...
The Real Time Crossing (Buckley, p. 457, The real-time crossing organ) is like a road intersection that splits the two crossing lanes, then uses traffic lights to give cars in each pair of lanes alternating turns to cross, and then merges the lanes back together (since each intersection works at 50% throughput, you need to split, use two of them, and merge -- Factorio and Satisfactory players will get what I mean, in terms of conveyor belts, splitters and mergers, and conveyor belt throughput).
The description of the real time crossing, "This real time crossing is not easily constructible, but nonetheless here it is", is a reference to the fact that you can only construct non-excited cells (you'd get electrocuted if you tried to construct machines with the power on, so to speak -- it may be possible to kludge it with some simple machines, but in general it's extremely impractical if not impossible -- see Buckley p. 470).
And after you've constructed a machine in a powered-down state, then you have to excite just the right cells at just the right time, to get the machine to work. But that's impossible with this real time signal crossing machine! So it's like a beautiful tiny crystal alien artifact with perfectly blinking lights, that the laws of physics practically prohibit from ever being constructed, but there it is.
The Real Time Crossing depends on having a certain synchronized configuration of excited cells in it, acting as synchronized clocks or traffic lights that start and stop all the traffic at just the right time so the cars don't collide.
It's not actually possible for a universal constructor to construct a real time crossing, because it can't reach in through existing cells and excite internal cells from outside. It's essentially like a "Garden of Eden" configuration, that had to have been constructed by the Hand of God, and can't be copied or constructed, or used as part of a reproducible machine. Essentially it has a "spark of life" that is beyond the ability of creatures living in the world to ignite. Intelligent Design and DRM FTW! ;)
<save
name="Real Time Crossing"
rows="16" cols="16"
description="This real time crossing is not easily constructible, but nonetheless here it is."
>
sssssw-----sbhb-
yggggggggg-wbyb-
hhhhhhhhhy-wbyb-
yggggggggg-wbyb-
------sssw-wbyb-
------w----wbyb-
------w----wbyb-
--ezshqaez-wbyb-
--yty--wyt-wbyb-
--shqshqsb-wbyb-
ssq-wezw-z-wbybs
--z-wyty-qswbybw
--shqshqsy--bybw
--ezw--wez--bybw
--ytyqswyt--bybw
-----w------hyhw
</save>
The "Coded Channel Crossing" (Buckley, p. 460) is like two channels sharing the same wire by using a coding system, so you have to somehow make sure neither channel tries to send a message over that one wire at the same time (left as an exercise for the reader ;), otherwise there will be a collision. This is the only kind of signal crossing organ designed by von Neumann.
<save
name="Coded Channel Crossing"
rows="8" cols="64"
description="Coded channel crossings have interference problems, demonstrated here."
>
-zaaaaaaa-----qsssesqsq-----------qhshqsssqsqsqsq---------------
-z------w-----w---w-z-z-----------w-------w-z---z---------------
-sshhsssqsssssqsqsq-ssssssssssssqsusqhesqsq-ssssshshssssssssssq-
--------------------------w-----z-------------------------------
zaagagaaa-thssqsssqsqsqsq-w-----b-tsssqsqsq---------------------
z-------w-w-------w-z---b-w-----b-w---w-z-z---------------------
ssssssssqsqsthqsqsq-ssssshw-----ssestsq-sshhsssssssssssssssssse-
----------------------------------------------------------------
</save>
This is the fun one, and the subject of Buckley's paper, an "Autoinitializing Exclusive Or" organ (Buckley, p. 473 and on). You can use these to solve the signal crossing problem, without needing the intervention of a benevolent God to power up all your traffic lights with the right synchronization. It actually has a "boot up" sequence: you first send it a "reset" signal, and part of it is used to initialize all the clocks the first time it's run, then it fires a bunch of "explosive bolts" that cut off the auto-initialization circuitry, and start up the exclusive or gate, after all its clocks have been initialized. It's literally self modifying code, that pokes itself after it boots, to switch into run mode! That's why it's so big and messy, compared the elegant but impossible to construct real time crossing.
<save
name="Autoinitializing Exclusive Or"
rows="28" cols="40"
description="William R. Buckley's autoinitializing exclusive-or is initialized by 11111 at each input."
>
sstsb-sqqssssssssssssssssssssssssz--szsz
y-z-b-wsw------------------------z--wzwz
w-b-b-w-sqqsqsssssssqfqssqsssssz-z--wzwz
y-z-b-qawsw----ssz--wsw--wsz---z-z--wzwz
w-b-b-qww-----sq-sqzqqz--wqaa--z-z--wzwz
y-z-z-w-qsq---wsqr-swwassz--w--z-z--wzwz
w-b-z-qaw-zcqsqsqsqssqsq-ssqw--z-z--wzwz
y-z-z-qww-zfw-zsqc-szzasqr-szssz-z--wzwz
w-b-zsw-w-z-w-sq-szwqqw--zqaqq-z-z--wzwz
yaa-sqz-w-q-w--sswswzsz--zsw-w-z-z--wzwz
------qsq-ssqsssssssqfqssqssqw-zsqz-wzwz
zga-sqw-z-ssqsssssssqfqssqssqszsq-szwzwz
b-y-wsz-z-wa---ssz--wsw--wsz--zwsqwzwzwz
z-w-w-q-z--w--sq-sssqqz--wqaaazw-w-zwzwz
b-y-w-z-z-qw--wsqr-wawassz---wzw-w-zwzwz
z-w-w-q-qswcqsqsqsqssqsq-ssqswsw-w-zwzwz
b-y-y-z-z--fw-zsqc-zazasqr-z---w-w-zwzwz
z-w-y-z-z---w-sq-sqsqqw--zqa---w-w-zwzwz
b-y-y-z-zsszw--ssw--zsz--zsw--qw-w-zwzwz
z-w-y-z-sq-sqsssssssqfqssqssssww-w-zwzwz
hstsy-z--sqsqsssssssqfqssqsssssw-w-zwzwz
------z-----z--ssz--wsw--wsz-----w-zwzwz
------z-----z-sq-sszqqz--wqaa----w-zwzwz
------z----fz-wsqr-swwasqc--w----w-zwzwz
------z----rqsqsqsqssqsq-sssw----w-zwzwz
------z----------------ssw-------w-zwzwz
------sssssssssssssssssssssssssssw-zwzwz
-----------------------------------swsww
</save>
Buckley, p. 473 ("rtco" means "Real Time Crossing Organ"):
>Auto-initialisation provides much more capability than that used in the rtco, the examples of clock synchronisation and trivial reconstruction being the simplest applications. Mechanisms used are signal sampling, portal closure, clock synchronisation, and staged initialisation. Our implementation uses three separate start signals; a staged initialisation. Each clock of the rtco has a separate auto-initialisation circuit. Signal to a stage is intercepted from a suitable path of channel A, by an interposing confluent state, or portal, and directed to the pulser of the adjacent auto-initialisation circuit by an auxiliary path. Pulser output is directed to clock input; and to a special transmission path constructor, which is addressed shortly. Clock signal for the entire organ is suitably synchronised, as initialisation of the first clock pair occurs simultaneously upon input of the first start pulse. All subsequent initialisations occur given knowledge of timing for the first two clocks. In this way, synchronisation becomes a trivial concern. Figure 17 shows the auto-initialisable rtco.
>Fig. 17. The rtco, configured for auto-initialisation. The minimum start signal for this organ is 10^13 10^32 1, which is applied once to Ai. The organ begins crossing signal 30 clock ticks later. This organ can be started at the time of construction; there is no start signal propagation. All signal crossing paths impose equal delay. The organ has 18×18 dimensions. This configuration can be marginally reduced in area.