As such, I have made a new NTAA-like rule to address these deficiencies.
Code: Select all
@NUTSHELL Shanghai
1: wire {w}
2: wire 0 {h0}
3: wire 1 {h1}
4: tail {wt}
5: splitter {s}
6: splitter 0 {s0}
7: splitter 1 {s1}
8: splitter tail {st}
@TABLE
states: 9
neighborhood: vonNeumann
h = (h0, s0, h1, s1) # heads
ws = (w, s) # wires
t = (wt, st) # tails
zero = (h0, s0) # zeros
one = (h1, s1) # ones
symmetries: permute
ws, t, any ~ 3; [0]
h, --ws ~ 4; [0: t*2]
t, --h ~ 4; [0: ws]
# Signals wait at normal wire intersections only,
# except at a normal wire at a cross junction with exactly one state-5 cell,
# which functions as a signal deleter
symmetries:rotate4reflect
w, (h0, h1), h0, w, s; [1]
w, (h0, h1), h1, w, s; wt
symmetries:permute
w, ws ~ 2, any ~ 2; w
w, h, --h ~ 3; [1: (h0, h0, h1, h1)]
s, h, --h ~ 3; [1: (s0, s0, s1, s1)]
# Head-on collision at T-junction is XOR, as in NTAA
symmetries: rotate4reflect
ws, zero, ws, one, 0; [0: one]
ws, h, ws, h, 0; [0: zero]
# Right-angle collision at T-junction is AND NOT, as in WWM
ws, ws, zero, one, 0; [0: one]
ws, ws, h, h, 0; [0: zero]
# Cross collision is straight lead OR (AND of perpendicular leads)
ws, h, one, h, ws; [0: one]
ws, one, h, one, ws; [0: one]
ws, h, h, h, ws; [0: zero]
@COLORS
48 48 48: 0
80 80 80: 1
56 68 209: 2
255 255 255: 3
150 150 150: 4
120 129 33: 5
125 141 131: 6
246 255 159: 7
182 191 95: 8
Code: Select all
@RULE Shanghai
********************************
**** COMPILED FROM NUTSHELL ****
**** v0.5.7 ****
********************************
1: wire
2: wire 0
3: wire 1
4: tail
5: splitter
6: splitter 0
7: splitter 1
8: splitter tail
@TABLE
neighborhood: vonNeumann
symmetries: rotate4reflect
n_states: 9
var any.0 = {0,1,2,3,4,5,6,7,8}
var any.1 = any.0
var any.2 = any.0
var h.0 = {2,3,6,7}
var h.1 = h.0
var h.2 = h.0
var ws.0 = {1,5}
var ws.1 = ws.0
var t.0 = {8,4}
var zero.0 = {2,6}
var one.0 = {3,7}
var one.1 = one.0
var _a0.0 = {0,2,3,4,6,7,8}
var _a0.1 = _a0.0
var _a0.2 = _a0.0
var _a0.3 = _a0.0
var _b0.0 = {0,1,4,5,8}
var _b0.1 = _b0.0
var _b0.2 = _b0.0
var _b0.3 = _b0.0
var _c0.0 = {2,3}
var _c0.1 = _c0.0
ws.0, any.0, any.1, any.2, t.0, ws.0
2, _a0.0, _a0.1, _a0.2, _a0.3, 4
6, _a0.0, _a0.1, _a0.2, _a0.3, 8
3, _a0.0, _a0.1, _a0.2, _a0.3, 4
7, _a0.0, _a0.1, _a0.2, _a0.3, 8
4, _b0.0, _b0.1, _b0.2, _b0.3, 1
8, _b0.0, _b0.1, _b0.2, _b0.3, 5
1, 1, 2, _c0.1, 5, _c0.1
1, 1, 3, _c0.0, 5, 4
1, any.0, any.1, ws.0, ws.1, 1
1, any.0, ws.0, any.1, ws.1, 1
1, 2, _b0.0, _b0.1, _b0.2, 2
1, 6, _b0.0, _b0.1, _b0.2, 2
1, 3, _b0.0, _b0.1, _b0.2, 3
1, 7, _b0.0, _b0.1, _b0.2, 3
5, 2, _b0.0, _b0.1, _b0.2, 6
5, 6, _b0.0, _b0.1, _b0.2, 6
5, 3, _b0.0, _b0.1, _b0.2, 7
5, 7, _b0.0, _b0.1, _b0.2, 7
1, 0, one.0, ws.0, zero.0, 3
5, 0, one.0, ws.0, zero.0, 7
1, 0, h.0, ws.0, h.1, 2
5, 0, h.0, ws.0, h.1, 6
1, 0, one.0, zero.0, ws.0, 3
5, 0, one.0, zero.0, ws.0, 7
1, 0, h.0, h.1, ws.0, 2
5, 0, h.0, h.1, ws.0, 6
1, h.0, one.0, h.1, ws.0, 3
5, h.0, one.0, h.1, ws.0, 7
1, h.0, one.0, ws.0, one.1, 3
5, h.0, one.0, ws.0, one.1, 7
1, h.0, h.1, h.2, ws.0, 2
5, h.0, h.1, h.2, ws.0, 6
@COLORS
0 48 48 48
1 80 80 80
2 56 68 209
3 255 255 255
4 150 150 150
5 120 129 33
6 125 141 131
7 246 255 159
8 182 191 95
Code: Select all
x = 119, y = 63, rule = Shanghai
49.D50.D3.D$48.D.D50.D.D$48.D.D2.5D44.D$47.D3.D5.D43.D.D$29.DCADCADBA
DB2A5.D3.D30.DCADCADBADB2A5.D3.D$41.A52.A$41.A22.A29.A22.A$21.DCADBAD
CADB34A8.DCADBADCADB34A$94.E4$49.D$49.D$47.5D$49.D$49.D2$21.DCADCADBA
DB10A22.A$41.25A$21.DCADBADCADB10A4$11.A$11.A$11.A.2A41.A.A17.A$11.2A
2.A20.6A13.A2.A18.A$11.A3.A20.A4.A2.3A2.D3.D.A2.A.2A4.D4.3A3.A$11.2A
2.A20.A4.A.A3.A.D3.D.A2.2A2.A2.D.D2.A3.A2.A$11.A.2A21.A4.A.A3.A2.D.D
2.A2.A3.A2.D.D2.A6.A$36.A4.A.A2.2A2.D.D2.A2.2A2.A.D3.D.A3.A2.A$.3A7.D
CADCADBADBADCADCADBADB3A4.A2.2A.A3.D4.A.A.2A2.D3.D2.3A2.A$A3.A36.A$A
3.A.4A.DCADCADCADCADBADBADBADB34A$A2.2A36.A24.A$.2A.A6.DCADBADCADBADC
ADBADCADB2A5.A$35.A5.A$12.3A20.A5.A$11.A3.A19.A5.4A$11.A23.A8.A$11.A
3.A19.A8.A$12.3A20.A8.A$35.10A2$74.A.A$74.A.A$74.A.A$74.A.A$74.A.A$
38.10A26.A.A$38.A8.A26.A.A$38.A8.A26.A.A$38.A8.A26.A.A$21.4ADCAE9AE8.
7A20.A.A$21.A6.A9.A8.A5.A16.C3A4E6A$21.A6.A9.A8.A5.A21.2E6.A$21.A6.A
9.A8.A5.A7.A14.A6.A$21.A6.A9.6AE2AE15A13.A6.A$21.A6.A15.A2.A5.A22.A6.
A$21.8A15.A2.A5.A22.A6.A$44.A2.A5.A22.7AE$44.10A29.15A!
The head-on collision at a T remains a XOR computation, but the right-angle collision has been changed to the ANDNOT gate, the configuration reminiscent of WWM. The four-way junction computes the OR of the central signal with the AND of the left and right signals, inspired by the and-or-invert gate sometimes used in electronic prototyping.
The configuration labelled with × in the demo above illustrates signal deletion. If a splitter cell is abutted to the blank space in an ANDNOT gate, and all the other relevant cells are normal (not splitter), a 1 signal coming on the inhibiting arm instead causes the central cell to turn into a tail, annihilating both signals.
Here are some more complicated constructions in the rule. In some cases the NTAA device can be adapted to the new rule just by adding splitter cells where necessary, but for the rest the devices get smaller here.
Code: Select all
x = 134, y = 72, rule = Shanghai
38.3A67.5A$33.A3.A3.A68.A$15.3A16.A2.A3.A63.A4.A$DCADBADCADB4AE.19A.A
.A.A8.ADCADBADBADBADCADB4ABH33A3.A$15.3A16.A2.A3.A29.A.A36.A$33.A3.A
3.A29.3A36.A$38.3A69.A3$14.D2A$14.C.D21.A$14.ADG16.A3.2A$16.3A15.A3.A
$DCADBADCADB5AE.18A2.A84.4A3.3A$16.3A15.A3.A84.A3.A.A3.A$33.A4.A81.A
2.A3.A.A$37.3A50.BDE29A.4A3.3A$50.5ADCADCADC8ADB12ADB4A.A30.A.A7.A$
90.3ACHAC26.A2.A2.A3.A$92.A.A.D26.A3.A2.3A$50.14ADBADC5ADBADCADB11A.
3A2$19.D2A$19.C.D$19.ADG12.A$21.15A$DBADCADCADB11A2$37.5A$20.AC19.A$
20.DG12.A$21.15A64.4AE6A$DBADCADCADB11A28.DB3ADC11ADB15ADCADB9A.A3.A
5.A$98.2AE.3ABHAB.A21.A$50.ADB5ADCADC11ADBADB19AE.A.A.B.A.D.24A$98.6A
H.3A.B$102.C.A5.D$100.2AH.7A4.4A9.3A$100.A.A12.A3.A3.D3.A3.A$41.A58.A
DC12.A3.A3.D3.A3.A$15.3A23.A73.4A2.5D.A3.A$DCADCADBADB4AE.19A4.3A72.A
7.D3.A3.A$15.2AE16.A4.A.A.A71.A7.D3.A2.A$DCADBADCADB4AE.19A.3A.A.3A
54.7A8.A12.2A.A$15.3A23.A58.A5.A$41.A58.A.BDA.A$100.A.A.A.A25.A$100.A
.H2A.28A$50.ADB5ADCADC11ADBADB20A.A.B3.B$15.3A80.2AE2ABD.D$15.D.A32.D
B3ADC11ADB15ADCADB8AE.A.A.A.A$15.CAH19.A3.A56.6AE2A$17.C16.A2.A3.A60.
C$DCADCADBADB25A2.A.A59.2AH$17.A20.A.A59.A.A$DCADBADCADB7A21.A60.ADC
6$DCADCADBADB7A$17.A$13.ADB.A$13.A.A.A16.A$13.2AHB19A$17.A21.A$DCADBA
DCADB7A2.ACD15.A.A$20.D.A15.A.A$DCADCADBADB9AGDA14.A3.A$19.A14.A2.A3.
A$DCADBADCADB25A!