## 3-state range-1 outer-totalistic rulespace

For discussion of other cellular automata.
muzik
Posts: 3612
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### 3-state range-1 outer-totalistic rulespace

This is an obvious, but to my knowledge not thoroughly explored, extension of the familiar 2-state outer-totalistic rules which are frequently investigated.

The notation of a rulestring is as follows (subject to change, if anyone has any better suggestions reply with them):

BA(nn)/BB(nn)/TA(nn)/TB(nn)/SA(nn)/SB(nn)

where:
BA - conditions for a state-1 cell to be born
BB - conditions for a state-2 cell to be born
TA - conditions for a state-1 cell to become a state-2 cell
TB - conditions for a state-2 cell to become a state-1 cell
SA - conditions for a state-1 cell to stay alive
SB - conditions for a state-2 cell to stay alive

Conditions would be a string of two consecutive digits, with the first digit specifying how many neighbouring state-1 cells and the second digit specifying how many state-2 cells. The sum of the consecutive digits cannot exceed 8. A condition cannot be for both transitioning and surviving for a cell. For example, this would be the three-valued replicator rule (with a lot of transitions since that's how XOR rules work):

Code: Select all

``````x = 1, y = 1, rule = BA020508101316212432354043516270_BB01040712152023263134425053_TA01040712152023263134425053_TB020508101316212432354043516270_SA020508101316212432354043516270_SB01040712152023263134425053
A!``````
The notation can be extended to von Neumann and hexagonal neighbourhoods like with normal notation. As for the LtL/HROT notation, I'm not sure but it could use the usual HROT comma notation, with each two consecutive numbers being considered one transition.

This would allow for the transcription of a broad range of rules (3^27 if I'm not mistaken), but this is only the tip of the iceberg compared to the isotropic non-totalistic extensions to this rulespace I'm currently working on notating.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

ivtb
Posts: 8
Joined: January 21st, 2018, 6:07 pm

### Re: 3-state range-1 outer-totalistic rulespace

Nice! I always thought we needed to explore more 3-state rules

I'm gonna try and make a python script that generates ruletrees for this kind of automaton

I think most transitions in are unnecessary since there is no way the outer sum of the cell is greater than 16 (8 state-2 cells)

Edit: Misunderstood your notation. I take back the comment
Last edited by ivtb on January 14th, 2020, 1:21 pm, edited 1 time in total.

Moosey
Posts: 2901
Joined: January 27th, 2019, 5:54 pm
Location: A house, or perhaps the OCA board. Or [click to not expand]
Contact:

### Re: 3-state range-1 outer-totalistic rulespace

Would this be the correct rulestring for deadlyenemies?

Code: Select all

``````x = 1, y = 1, rule = BA3021_BB0312_TA_TB_SA2030_SB0203
.A.\$2.A\$3A!``````
I am a prolific creator of many rather pathetic googological functions

My CA rules can be found here

Also, the tree game
Bill Watterson once wrote: "How do soldiers killing each other solve the world's problems?"

ivtb
Posts: 8
Joined: January 21st, 2018, 6:07 pm

### Re: 3-state range-1 outer-totalistic rulespace

Code: Select all

``````name = "BA010407101316_BB0205081114_TA0205081114_TB010407101316_SA010407101316_SB0205081114"
n_states = 3
n_neighbors = 8

transitions = sorted(name.split("_"))

BA = transitions[2:]
BB = transitions[2:]
SA = transitions[2:]
SB = transitions[2:]
TA = transitions[2:]
TB = transitions[2:]

def transition_function(a):

n = a+a+a+a+a+a+a+a

if a == 0:

for i in range(len(BA) // 2):
if (n == int(BA[2*i:2*i + 2])):
return 1

for i in range(len(BB) // 2):
if (n == int(BB[2*i:2*i + 2])):
return 2

if a == 1:

for i in range(len(TA) // 2):
if (n == int(TA[2*i:2*i + 2])):
return 2

for i in range(len(SA) // 2):
if (n == int(SA[2*i:2*i + 2])):
return 1

if a == 2:

for i in range(len(TB) // 2):
if (n == int(TB[2*i:2*i + 2])):
return 1

for i in range(len(SB) // 2):
if (n == int(SB[2*i:2*i + 2])):
return 2
return 0``````

I misunderstood the OP and created a notation for a different class of automata, where the sum of all neighbors (with state 2 counting as 2 state 1 cells) determines each transition; each pair of digits represents one possible value for the sum. If less than 10 a leading zero is placed, ex: 09 instead of 9.

Here is a simple replicator rule in this notation

To explore other rules in this category just change "name", copy the code and run make-ruletree.py

ivtb
Posts: 8
Joined: January 21st, 2018, 6:07 pm

### Re: 3-state range-1 outer-totalistic rulespace

Code: Select all

``````name = "BA02050810131621243235404351627008_BB010407121520232631344250536180_TA010407121520232631344250536180_TB02050810131621243235404351627008_SA02050810131621243235404351627008_SB010407121520232631344250536180"

n_states = 3
n_neighbors = 8

transitions = sorted(name.split("_"))

BA = transitions[2:]
BB = transitions[2:]
SA = transitions[2:]
SB = transitions[2:]
TA = transitions[2:]
TB = transitions[2:]

def transition_function(a):

ones = 0
twos = 0

for i in range(8):
if a[i] == 1:
ones += 1
if a[i] == 2:
twos += 1

if a == 0:

for i in range(len(BA) // 2):
if (ones == int(BA[2*i]) and twos == int(BA[2*i + 1])):
return 1

for i in range(len(BB) // 2):
if (ones == int(BB[2*i]) and twos == int(BB[2*i + 1])):
return 2

if a == 1:

for i in range(len(TA) // 2):
if (ones == int(TA[2*i]) and twos == int(TA[2*i + 1])):
return 2

for i in range(len(SA) // 2):
if (ones == int(SA[2*i]) and twos == int(SA[2*i + 1])):
return 1

if a == 2:

for i in range(len(TB) // 2):
if (ones == int(TB[2*i]) and twos == int(TB[2*i + 1])):
return 1

for i in range(len(SB) // 2):
if (ones == int(SB[2*i]) and twos == int(SB[2*i + 1])):
return 2
return 0``````
Now it's implemented correctly. The rule is your replicator rule with a small correction. Again, just change the rule name and run make-ruletree.py with the code in clipboard

muzik
Posts: 3612
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: 3-state range-1 outer-totalistic rulespace

dvgrn, on the discord, wrote:
December 31st, 1969, 8:11 pm
Maybe the "T" transitions should be "TAB" and "TBA"? -- just because the notation as you describe it doesn't extend cleanly to four or more states, but if you specified both the "from" and "to" states after "T" then it would... up to twenty-six states, theoretically, but the rule strings might get too unwieldy well before then.
(But then the syntax might be simplified by using "Z" as the zero state, so there's always a "from" state and a "to" state listed and you wouldn't need B and S for "birth" and "survival".)
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

muzik
Posts: 3612
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: 3-state range-1 outer-totalistic rulespace

Currently in the process of developing a notation for isotropic non-totalistic 3-state rules: I've also noticed that the BSFKL rulespace also seems to be a subset of the 3-state outer-totalistic rulespace, so software support for the latter might be a higher priority.

Also, something that could be handy: how about a script that converts an applicable ruletable into outer-totalistic 3-state notation? There's quite a few such rules.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

ivtb
Posts: 8
Joined: January 21st, 2018, 6:07 pm

### Re: 3-state range-1 outer-totalistic rulespace

muzik wrote:
January 19th, 2020, 7:19 pm
Currently in the process of developing a notation for isotropic non-totalistic 3-state rules: I've also noticed that the BSFKL rulespace also seems to be a subset of the 3-state outer-totalistic rulespace, so software support for the latter might be a higher priority.

Also, something that could be handy: how about a script that converts an applicable ruletable into outer-totalistic 3-state notation? There's quite a few such rules.
One way to automate this could involve running this pattern for 1 generation in code and adding correspondent transitions into the name string

Code: Select all

``````x = 81, y = 27, rule = 12/34/3
10.B2.B2.B2.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.11B\$4.
A2.B5.A2.B5.A2.B3.B.AB.2B2.B.AB.2B2.B.AB.2B2.B.AB.3B.2BA5B.2BA4B\$38.B
2.B2.B.2B.2B.29B\$.A2.A2.A2.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.
AB.AB.AB.A2BA2BA2BAB\$4.A2.B5.A2.B3.B.AB.2B2.B.AB.2B2.B.AB.2B2.B.AB.3B
.2BA5B.2BA4B\$29.B2.B2.B.2B.2B.29B\$.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.
2A.2A.2A.2A.2A.2A.2AB2AB2AB2A\$4.A2.B3.B.AB.2B2.B.AB.2B2.B.AB.2B2.B.AB
.3B.2BA5B.2BA4B\$20.B2.B2.B.2B.2B.29B\$.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.
2A.2A.2A.2A.2AB2AB2AB2A\$2.A.2A.BA2.A.2A.BA2.A.2A.BA2.A.2A.BAB.AB2A2BA
B.AB2A2BA\$11.B2.B2.B.2B.2B.29B\$.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2AB
2AB2AB2A\$2.A.2A.BA2.A.2A.BA2.A.2A.BAB.AB2A2BAB.AB2A2BA\$2.A2.A2.A.BA.B
A.BA2BA2BA2BA2BA2BA2BA2BA2BA2BA\$.2A.2A.2A.2A.2A.2A.2A.2A.2AB2AB2AB2A\$
2.A.2A.BA2.A.2A.BAB.AB2A2BAB.AB2A2BA\$.2A.2A.2AB2AB2AB2AB2AB2AB2AB2AB
2AB2A\$.2A.2A.2A.2A.2A.2AB2AB2AB2A\$2.A.2A.BAB.AB2A2BAB.AB2A2BA\$27A\$.2A
.2A.2AB2AB2AB2A\$A.5AB2A.5ABA\$18A\$9A\$A.5ABA\$9A!
``````
I tried but something is wrong with my code and I can't make it work using golly.parse and golly.evolve

Up-down dimension is the amount of state-1 cells; Left-right within a group of 3 is center cell state, and between groups of three the amount of state-2 cells

ivtb
Posts: 8
Joined: January 21st, 2018, 6:07 pm

### Re: 3-state range-1 outer-totalistic rulespace

muzik wrote:
January 19th, 2020, 7:19 pm
Also, something that could be handy: how about a script that converts an applicable ruletable into outer-totalistic 3-state notation? There's quite a few such rules.
This python script names an outer-totalistic rule. Just set the current rule in golly to the rule you're inspecting, run the script and the rule name will be copied to the clipboard (Using BA/BB/TA/TB/SA/SB notation)

Code: Select all

``````from golly import *

start = parse('''10.B2.B2.B2.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.2B.11B\$4.
A2.B5.A2.B5.A2.B3.B.AB.2B2.B.AB.2B2.B.AB.2B2.B.AB.3B.2BA5B.2BA4B\$38.B
2.B2.B.2B.2B.29B\$.A2.A2.A2.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.AB.
AB.AB.AB.A2BA2BA2BAB\$4.A2.B5.A2.B3.B.AB.2B2.B.AB.2B2.B.AB.2B2.B.AB.3B
.2BA5B.2BA4B\$29.B2.B2.B.2B.2B.29B\$.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.
2A.2A.2A.2A.2A.2A.2AB2AB2AB2A\$4.A2.B3.B.AB.2B2.B.AB.2B2.B.AB.2B2.B.AB
.3B.2BA5B.2BA4B\$20.B2.B2.B.2B.2B.29B\$.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.
2A.2A.2A.2A.2AB2AB2AB2A\$2.A.2A.BA2.A.2A.BA2.A.2A.BA2.A.2A.BAB.AB2A2BA
B.AB2A2BA\$11.B2.B2.B.2B.2B.29B\$.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2AB
2AB2AB2A\$2.A.2A.BA2.A.2A.BA2.A.2A.BAB.AB2A2BAB.AB2A2BA\$2.A2.A2.A.BA.B
A.BA2BA2BA2BA2BA2BA2BA2BA2BA2BA\$.2A.2A.2A.2A.2A.2A.2A.2A.2AB2AB2AB2A\$
2.A.2A.BA2.A.2A.BAB.AB2A2BAB.AB2A2BA\$.2A.2A.2AB2AB2AB2AB2AB2AB2AB2AB
2AB2A\$.2A.2A.2A.2A.2A.2AB2AB2AB2A\$2.A.2A.BAB.AB2A2BAB.AB2A2BA\$27A\$.2A
.2A.2AB2AB2AB2A\$A.5AB2A.5ABA\$18A\$9A\$A.5ABA\$9A!''')

result = evolve(start,1)

def mygetcell(x,y):
for i in range(len(result) // 3):
if (x==result[3*i]) and (y==result[3*i + 1]):
return result[3*i + 2]
return 0

transitions = []

for s in range(3):
for i in range(9):
for j in range(9 - i):
transitions.append((j,i,s,mygetcell(1+9*i+3*s,1+3*j)))

form = [ [x for x in transitions if x == 0 and x == 1] , [x for x in transitions if x == 0 and x == 2],\
[x for x in transitions if x == 1 and x == 2],[x for x in transitions if x == 2 and x == 1], \
[x for x in transitions if x == 1 and x == 1], [x for x in transitions if x == 2 and x == 2]]

flist = [[],[],[],[],[],[]]
slist = [[],[],[],[],[],[]]
fstr = ["","","","","",""]

for j in range(6):
for i in form[j]:
flist[j].append(str(i) + str(i))

for j in range(6):
slist[j] = sorted(flist[j])
for i in slist[j]:
fstr[j] += i

setclipstr("BA" + fstr + "_BB" + fstr + "_TA" + fstr + "_TB" + fstr + "_SA" + fstr + "_SB" + fstr)``````

I ran this script with the generations 12/34/3 rule and it gave me "BA3031323334354041424344_BB_TA000102030405060708303132333435404142434450515253606162707180_TB_SA101112131415161720212223242526_SB"

Using my other script I compiled this into a ruletree:

Code: Select all

``````name = "BA3031323334354041424344_BB_TA000102030405060708303132333435404142434450515253606162707180_TB_SA101112131415161720212223242526_SB"

n_states = 3
n_neighbors = 8

transitions = sorted(name.split("_"))

BA = transitions[2:]
BB = transitions[2:]
SA = transitions[2:]
SB = transitions[2:]
TA = transitions[2:]
TB = transitions[2:]

def transition_function(a):

ones = 0
twos = 0

for i in range(8):
if a[i] == 1:
ones += 1
if a[i] == 2:
twos += 1

if a == 0:

for i in range(len(BA) // 2):
if (ones == int(BA[2*i]) and twos == int(BA[2*i + 1])):
return 1

for i in range(len(BB) // 2):
if (ones == int(BB[2*i]) and twos == int(BB[2*i + 1])):
return 2

if a == 1:

for i in range(len(TA) // 2):
if (ones == int(TA[2*i]) and twos == int(TA[2*i + 1])):
return 2

for i in range(len(SA) // 2):
if (ones == int(SA[2*i]) and twos == int(SA[2*i + 1])):
return 1

if a == 2:

for i in range(len(TB) // 2):
if (ones == int(TB[2*i]) and twos == int(TB[2*i + 1])):
return 1

for i in range(len(SB) // 2):
if (ones == int(SB[2*i]) and twos == int(SB[2*i + 1])):
return 2
return 0``````
And it works exactly like the original 12/34/3 rule