Embedding Rule-110 into a 2D totalistic Neumann-nbhr. CA
Posted: December 4th, 2016, 8:42 pm
So this is Turing-complete.
It could be optimized. And also could be extended with other cell states to build an infinite embedded diagonal 1D-CA space.
The rule file is:
And an example pattern is (the crossroads denote the cells in Rule-110):
The result can be checked comparing with the output of this tiny python code:
Just for fun! 
It could be optimized. And also could be extended with other cell states to build an infinite embedded diagonal 1D-CA space.
The rule file is:
Code: Select all
@RULE rule110in2d
Embedding rule 110 elementary cellular automaton - it is Turing-complete
Naszvadi Peter, 2016
@TABLE
# Format: C,N,E,S,W,C'
n_states:15
neighborhood:vonNeumann
symmetries:permute
var a={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}
var b={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}
var c={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}
var d={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}
var e={0,1,2,3,4,5,6,7,8,9,10,11,13,14}
var f={0,1,2,3,4,5,6,7,8,9,10,11,13,14}
var g={0,1,2,3,4,5,6,7,8,9,10,11,13,14}
var h={0,1,2,3,4,5,6,7,8,9,10,13,14}
var i={0,1,2,3,4,5,6,7,8,9,10,13,14}
var j={0,1,2,3,4,5,6,7,8,9,10,13,14}
var k={0,1,2,4,5,6,7,8,9,10,13,14}
var l={0,1,2,4,5,6,7,8,9,10,13,14}
var m={0,1,2,4,5,6,7,8,9,10,13,14}
var n={0,1,2,3,4,5,6,8,9,10,11,12,13,14}
var o={0,1,2,3,4,5,6,8,9,10,11,12,13,14}
var p={0,1,2,3,4,5,6,8,9,10,11,12,13,14}
var q={0,1,2,4,5,6,7,8,9,10,11,12,13,14}
var r={0,1,2,3,4,5,6,8,9,10,13,14}
var s={0,1,2,3,4,5,6,8,9,10,13,14}
var t={0,1,2,3,4,5,6,8,9,10,13,14}
var u={0,1,2,4,5,6,7,8,9,10,11,12,13,14}
var v={0,1,2,4,5,6,7,8,9,10,11,12,13,14}
var w={0,1,2,5,6,9,10,11,12,13,14}
var x={0,1,2,5,6,9,10,11,12,13,14}
var y={0,1,2,5,6,9,10,11,12,13,14}
var z={0,1,2,5,6,9,10,11,12,13,14}
1,12,a,b,c,4
1,11,e,f,g,3
1,3,h,i,j,3
1,4,k,l,m,4
1,a,b,c,d,1
2,a,b,c,d,1
3,a,b,c,d,2
4,a,b,c,d,2
5,12,a,b,c,8
5,11,e,f,g,7
5,7,h,i,j,7
5,8,r,s,t,8
5,a,b,c,d,5
6,a,b,c,d,5
7,a,b,c,d,6
8,a,b,c,d,6
9,7,3,a,b,12
9,4,n,o,p,11
9,4,q,u,v,11
9,3,n,o,p,11
9,7,q,u,v,11
9,8,n,o,p,11
9,8,q,u,v,11
9,w,x,y,z,9
10,7,a,b,c,11
10,8,n,o,p,12
10,3,n,o,p,12
10,4,n,o,p,12
10,w,x,y,z,10
11,a,b,c,d,13
12,a,b,c,d,14
13,a,b,c,d,9
14,a,b,c,d,10
@COLORS
1 255 255 255
2 192 192 192
3 64 255 64
4 255 64 64
5 250 250 250
6 188 188 188
7 60 250 60
8 250 60 60
9 0 128 0
10 128 0 0
11 64 192 192
12 192 64 192
13 192 192 64
14 192 192 0Code: Select all
x = 7, y = 15, rule = rule110in2d
LAA$
F.B$
EEKAA$
..F.B$
..EEKAA$
....F.B$
....EEK$
$
$
$
LAAAA$
F...A$
E...A$
E...B$
EEEEK$!Code: Select all
#!/usr/bin/env python
# rule transitions vector:
d=[0,1,1,1,0,1,1,0]
# initial space configuration:
a=[0,1,1,1]
for j in range(9): # nine generations
print a
a=[0]+a+[0]
b=[]
for i in range(1,len(a)-1):
b=b+[d[4*a[i-1]+2*a[i]+a[i+1]]]
a=b