Triangular neighbourhood rules

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

Triangular neighbourhood rules

Post by muzik » January 22nd, 2020, 9:12 pm

2D CA are most popularly emulated on a square grid {4,4}, and occasionally on the hexagonal grid {6,3}. There exist one more proper tiling {3,6}, the triangular tiling, which can also be used to simulate cellular automata. LifeViewer has had support for range-1 triangular CA for almost a year now, but this feature hasn't seen nearly enough use, so it's probably a good idea to spark discussion of these rules so the implementation doesn't go to waste.

Obligatory parity/replication rules:

Code: Select all

 x = 1, y = 1, rule = B13579Y/S13579YL
o!

Code: Select all

 x = 1, y = 1, rule = B13579Y/S02468XZL
o!
For the Triangular Edges neighbourhood, it can be noted that these mimic the behaviour of the hexagonal parity rules on even generations:

Code: Select all

 x = 1, y = 1, rule = B13/S02LE
o!

Code: Select all

 x = 1, y = 1, rule = B135/S135H
o!

Code: Select all

 x = 1, y = 1, rule = B13/S13LE
o!

Code: Select all

 x = 1, y = 1, rule = B135/S0246H
o!
FredkinModN.py allows for generalisation of parity rules like with other neighbourhoods (even if attempting to generate higher order moore ones does murdery things to the computer):

Code: Select all

 x = 1, y = 1, rule = Fredkin mod3 triangularVonNeumann emulated
o!

Code: Select all

 x = 1, y = 1, rule = Fredkin mod5 triangularVonNeumann emulated
o!

Code: Select all

 x = 1, y = 1, rule = Fredkin mod7 triangularVonNeumann emulated
o!

Code: Select all

 x = 1, y = 1, rule = Fredkin mod11 triangularVonNeumann emulated
o!

Code: Select all

 x = 1, y = 1, rule = Fredkin mod13 triangularVonNeumann emulated
o!
Spaceships can exist in triangular rules like with most other rulespaces. For example, here are the spaceships from the trilife package on the golly rule repository:

Code: Select all

x = 4, y = 2, rule = B4/S456L
4o$4o!

Code: Select all

x = 7, y = 4, rule = B45/S23L
5bo$o3b3o$o3b3o$5bo!

Code: Select all

x = 8, y = 3, rule = B45/S34L
5bobo$3o2b3o$3o3b2o!
as well as the following ship provided in the triangular lifeviewer demo:

Code: Select all

x = 8, y = 6, rule = B456/S34L
bo3bo$bo4bo$b2o4bo$2bo5bo$2bo5bo$3b2ob2o!
The demo also shows a triangular generations rule with interesting dynamics including a common unloopable RRO:

Code: Select all

 x = 8, y = 6, rule = G10/B34/S34L
bo3bo$bo4bo$b2o4bo$2bo5bo$2bo5bo$3b2ob2o!
[[ THEME Blues ]]
I haven't tried creating an isotropic non-totalistic notation for the triangular grid, and it'd probably be significantly bigger than the current square moore non totalistic notation, and maybe bigger than range 2 vN and also the range 1 3 state notation I'm currently busy with. I might do so in the future though.

Please discuss further!
Last edited by muzik on January 29th, 2020, 10:45 pm, edited 1 time in total.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

User avatar
Hdjensofjfnen
Posts: 1487
Joined: March 15th, 2016, 6:41 pm
Location: r cis θ

Re: Triangular neighbourhood rules

Post by Hdjensofjfnen » January 22nd, 2020, 9:52 pm

I apologize - is the neighborhood with the spaceships range-2 triangular?
EDIT: I see:

Code: Select all

x = 5, y = 3, rule = B/S0123456789L
bobo$2ob2o$b3o!
EDIT: Well, here is a p9 mod3:

Code: Select all

x = 5, y = 4, rule = B4/S345L
3bo$o$b4o$3bo!
and a p8 mod4:

Code: Select all

x = 9, y = 4, rule = B45/S23L
2b3ob2o$bo6bo$7bo$3bobo!
"A man said to the universe:
'Sir, I exist!'
'However,' replied the universe,
'The fact has not created in me
A sense of obligation.'" -Stephen Crane

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

bprentice
Posts: 644
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Triangular neighbourhood rules

Post by bprentice » January 22nd, 2020, 11:31 pm

muzik wrote:
January 22nd, 2020, 9:12 pm
Please discuss further!
Look at these archives:

http://bprentice.webenet.net/Triangular%20Cell/

and search for "Triangular" in this board.

Brian Prentice

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

Re: Triangular neighbourhood rules

Post by muzik » January 23rd, 2020, 5:28 am

The p9 bundled with trilife:

Code: Select all

 x = 6, y = 4, rule = B4/S456L
3bo$b5o$b5o$3bo!
There's also a more complex p4 in the zip.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

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

Re: Triangular neighbourhood rules

Post by muzik » January 29th, 2020, 7:18 pm

A question: can mod-3 2D Moore replicators exist on the triangular grid? I gave my computer a good hundred hours to generate such a rule, and it got back to me with this:

Code: Select all

x = 1, y = 1, rule = Fredkin_mod3_triangularMoore_emulated
o!
Either the script is at fault here, or there's something special about the triangular grid that stops these replication habits from existing, as there's definitely preserved symmetry and large amounts of death at 3^n generations.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

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

Re: Triangular neighbourhood rules

Post by muzik » January 29th, 2020, 8:06 pm

p6 mod 1:

Code: Select all

 x = 4, y = 2, rule = B45/S34L
4o$o2bo!
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

bprentice
Posts: 644
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Triangular neighbourhood rules

Post by bprentice » January 29th, 2020, 11:19 pm

muzik wrote:
January 29th, 2020, 7:18 pm
A question: can mod-3 2D Moore replicators exist on the triangular grid?
What does "mod-3 2D Moore replicators" mean?

Triangular rules defined by these dialogs:

1.png
1.png (117.03 KiB) Viewed 1620 times
2.png
2.png (49.43 KiB) Viewed 1620 times

and generated by this step code:

Code: Select all

  public int step(int c, int r)
  {
    int cell = triangularCell.getCell(c, r);
    int count;
    if (!((c & 1) == 0) ^ ((r & 1) == 0))
    {
      count =
      stateWeights[triangularCell.getCell(c - 2, r + 1)] * neighborWeights[0][4] +
      stateWeights[triangularCell.getCell(c + 2, r + 1)] * neighborWeights[0][0] +
      stateWeights[triangularCell.getCell(c    , r - 1)] * neighborWeights[2][2] +
      stateWeights[triangularCell.getCell(c    , r + 1)] * neighborWeights[0][2] +
      stateWeights[triangularCell.getCell(c - 1, r - 1)] * neighborWeights[2][3] +
      stateWeights[triangularCell.getCell(c - 1, r    )] * neighborWeights[1][3] +
      stateWeights[triangularCell.getCell(c - 1, r + 1)] * neighborWeights[0][3] +
      stateWeights[triangularCell.getCell(c + 1, r    )] * neighborWeights[1][1] +
      stateWeights[triangularCell.getCell(c + 1, r + 1)] * neighborWeights[0][1] +
      stateWeights[triangularCell.getCell(c + 2, r    )] * neighborWeights[1][0] +
      stateWeights[triangularCell.getCell(c - 2, r    )] * neighborWeights[1][4] +
      stateWeights[triangularCell.getCell(c + 1, r - 1)] * neighborWeights[2][1] +
      stateWeights[cell] * neighborWeights[1][2];
    }
    else
    {
      count =
      stateWeights[triangularCell.getCell(c - 2, r - 1)] * neighborWeights[0][0] +
      stateWeights[triangularCell.getCell(c + 2, r - 1)] * neighborWeights[0][4] +
      stateWeights[triangularCell.getCell(c    , r - 1)] * neighborWeights[0][2] +
      stateWeights[triangularCell.getCell(c    , r + 1)] * neighborWeights[2][2] +
      stateWeights[triangularCell.getCell(c - 1, r - 1)] * neighborWeights[0][1] +
      stateWeights[triangularCell.getCell(c - 1, r    )] * neighborWeights[1][1] +
      stateWeights[triangularCell.getCell(c - 1, r + 1)] * neighborWeights[2][1] +
      stateWeights[triangularCell.getCell(c + 1, r    )] * neighborWeights[1][3] +
      stateWeights[triangularCell.getCell(c + 1, r + 1)] * neighborWeights[2][3] +
      stateWeights[triangularCell.getCell(c + 2, r    )] * neighborWeights[1][4] +
      stateWeights[triangularCell.getCell(c - 2, r    )] * neighborWeights[1][0] +
      stateWeights[triangularCell.getCell(c + 1, r - 1)] * neighborWeights[0][3] +
      stateWeights[cell] * neighborWeights[1][2];
    }
    if ((count >= 0) && (count < noCounts))
    {
      useTable[cell][count] = 1;
      return ruleTable[cell][count];
    }
    return 0;
  }
support linear replicators. Many of the guns in this archive:

http://bprentice.webenet.net/Triangular ... 20Guns.zip

use such replicators.

Brian Prentice

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

Re: Triangular neighbourhood rules

Post by muzik » January 30th, 2020, 5:07 am

bprentice wrote:
January 29th, 2020, 11:19 pm
muzik wrote:
January 29th, 2020, 7:18 pm
A question: can mod-3 2D Moore replicators exist on the triangular grid?
What does "mod-3 2D Moore replicators" mean?
Obviously a pattern that replicates in two dimensions every 3^n generations according to the Triangular Moore neighbourhood.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

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

Re: Triangular neighbourhood rules

Post by muzik » January 30th, 2020, 5:23 am

One of the other mentioned spaceships, in an explosive rule:

Code: Select all

 x = 7, y = 4, rule = B456/S12L
2bo2b2o$o4b2o$5b2o$b2o2bo!
Are any more spaceships known across the supported rulespaces?
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

bprentice
Posts: 644
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Triangular neighbourhood rules

Post by bprentice » January 30th, 2020, 4:45 pm

The supported rulespaces include the following rule families:

1.png
1.png (40.36 KiB) Viewed 1565 times

Many example patterns in each of these rule families are included in the following archive:

http://bprentice.webenet.net/Triangular ... 20Cell.zip

A rule from the "Rule Table" family is shown in a previous post above.

muzik wrote:
January 30th, 2020, 5:07 am
Are any more spaceships known across the supported rulespaces?
Of course, there are many other known spaceships in the supported rulespaces! Here are just two that are included in the following archive:

http://bprentice.webenet.net/Triangular ... 20Guns.zip

2.png
2.png (817.57 KiB) Viewed 1565 times

3.png
3.png (721.99 KiB) Viewed 1565 times

Brian Prentice

bprentice
Posts: 644
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Triangular neighbourhood rules

Post by bprentice » January 31st, 2020, 10:15 pm

Ship:

Code: Select all

x = 158, y = 58, rule = B1XYZ/S1L
53.5A$53.A.A2.A$51.2A5.A$51.3A$52.2A.2A$50.2A$50.A.A3.2A$55.3A$47.2A
5.3A$47.A.A3.2A$52.3A$44.2A5.3A$44.A.A3.2A$49.3A$41.2A5.3A$41.A.A3.
2A$46.3A$38.2A5.3A$38.A.A3.2A$43.3A$35.2A5.3A$35.A.A3.2A$40.3A$32.2A
5.3A$32.A.A3.2A$37.3A$29.2A5.3A$29.A.A3.2A$34.3A$26.2A5.3A38.2A$26.
A.A3.2A40.A.A3.2A$31.3A45.3A$23.2A5.3A38.2A5.3A$23.A.A3.2A40.A.A3.2A
$28.3A45.3A$20.2A5.3A38.2A5.3A$20.A.A3.2A40.A.A3.2A$25.3A45.3A$17.2A
5.3A38.2A5.3A$17.A.A3.2A40.A.A3.2A$22.3A45.3A$14.2A5.3A38.2A5.3A$14.
A.A3.2A40.A.A3.2A$19.3A45.3A$11.2A5.3A38.2A5.3A$11.A.A3.2A40.A.A3.2A
$16.3A45.3A$8.2A5.3A38.2A5.3A36.5A$8.A.A3.2A40.A.A3.2A37.A2.A2.A33.
5A7.5A$13.3A45.3A36.2A3.3A33.A.A.A7.A.A.A$5.2A5.3A38.2A5.3A37.A5.A$
5.A.A3.2A40.A.A3.2A40.A.2A.A.5A30.A11.A$10.3A45.3A44.2A.A.A2.A28.3A
9.3A$2.5A2.3A45.3A46.2A5.A$2.A.A2.A98.3A$2A5.A99.2A.2A$3A$.2A.2A!
Brian Prentice

User avatar
Layz Boi
Posts: 74
Joined: October 25th, 2018, 3:57 pm

Re: Triangular neighbourhood rules

Post by Layz Boi » February 1st, 2020, 2:43 pm

bprentice wrote:
January 31st, 2020, 10:15 pm
Ship:

Code: Select all

x = 158, y = 58, rule = B1XYZ/S1L
53.5A$53.A.A2.A$51.2A5.A$51.3A$52.2A.2A$50.2A$50.A.A3.2A$55.3A$47.2A
5.3A$47.A.A3.2A$52.3A$44.2A5.3A$44.A.A3.2A$49.3A$41.2A5.3A$41.A.A3.
2A$46.3A$38.2A5.3A$38.A.A3.2A$43.3A$35.2A5.3A$35.A.A3.2A$40.3A$32.2A
5.3A$32.A.A3.2A$37.3A$29.2A5.3A$29.A.A3.2A$34.3A$26.2A5.3A38.2A$26.
A.A3.2A40.A.A3.2A$31.3A45.3A$23.2A5.3A38.2A5.3A$23.A.A3.2A40.A.A3.2A
$28.3A45.3A$20.2A5.3A38.2A5.3A$20.A.A3.2A40.A.A3.2A$25.3A45.3A$17.2A
5.3A38.2A5.3A$17.A.A3.2A40.A.A3.2A$22.3A45.3A$14.2A5.3A38.2A5.3A$14.
A.A3.2A40.A.A3.2A$19.3A45.3A$11.2A5.3A38.2A5.3A$11.A.A3.2A40.A.A3.2A
$16.3A45.3A$8.2A5.3A38.2A5.3A36.5A$8.A.A3.2A40.A.A3.2A37.A2.A2.A33.
5A7.5A$13.3A45.3A36.2A3.3A33.A.A.A7.A.A.A$5.2A5.3A38.2A5.3A37.A5.A$
5.A.A3.2A40.A.A3.2A40.A.2A.A.5A30.A11.A$10.3A45.3A44.2A.A.A2.A28.3A
9.3A$2.5A2.3A45.3A46.2A5.A$2.A.A2.A98.3A$2A5.A99.2A.2A$3A$.2A.2A!
!
Brian Prentice
Some useless oscillators:

Code: Select all

x = 101, y = 85, rule = B1xyz/S1L
22$45b5o$45b2ob2o$46b3o2b5o$51b2ob2o$49b6o$44bo14bo18b5o3bo4bo$29b5o44b
2ob3o$23bo5b2ob2o13bo31b3obo$30b3o$87bo$27b5o45bo$27b2ob2o52bo$20bo5b
5o$27b2o2$33bo14bo5bo$28bo14bo$62bo$49b3obo$48b7o20bo6bo$40bo4b4obob5o
4bo$47b4obob2o$21bo5b5o20b3o$27b2ob2o12bo37b2o$25b6o$26b3o$28bo49bo6b
o$22bo7b3o25bo$29b2ob2o$28b6o16b5o11bo$50b2ob2o3b3o$51b3o3b6o$28bo30b
2ob2o$59b5o$41b3o$40b2ob2o$40b5o$41bo2$37bo8bo17b5o4bo$64b2ob2o$59bo5b
3o$63bo20bo2$22bo4b5o33bo$27b2ob2o15bo16b2o14b5o$28b3o49b2ob2obo$27b2o
52b3o6bo$28b6o9b3o7bo$23bo5b2ob2o8b2ob2o18bo$30b3o9b6o33bo$47bo2$41bo
8bo!

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

Re: Triangular neighbourhood rules

Post by muzik » February 1st, 2020, 7:15 pm

Here are the alternating cases of the aforementioned Moore parity rules:

Code: Select all

 x = 1, y = 1, rule = B13579Y/S13579YL|B13579Y/S02468XZL
o!

Code: Select all

 x = 1, y = 1, rule = B13579Y/S02468XZL|B13579Y/S13579YL
o!
and vN:

Code: Select all

 x = 1, y = 1, rule = B13/S02LE|B13/S13LE
o!

Code: Select all

 x = 1, y = 1, rule = B13/S13LE|B13/S02LE
o!
Triangular Vertices does not seem to support replicators.

I really want to see this neighbourhood supported:

Code: Select all

 x = 7, y = 4, rule = B/S0123456789XYZL
7o$b5o$2b3o$3bo!
[[ GRID ]]
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!

bprentice
Posts: 644
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Triangular neighbourhood rules

Post by bprentice » February 1st, 2020, 9:08 pm

Three more ships:

Code: Select all

x = 63, y = 36, rule = B19YL
33.5A$32.A4.A$32.2A$33.3A2$32.2A3.2A$32.2A3.2A$33.2A.2A4$38.2A3.2A$
38.2A3.2A$39.2A.2A4$44.2A3.2A$44.2A3.2A$45.2A.2A4$50.2A3.2A$50.2A3.
2A$51.2A.2A4$56.2A3.2A$7.5A7.5A7.5A7.5A7.A6.A$7.A4.A6.A4.A6.A4.A6.A
4.A6.A$.5A5.2A10.2A10.2A10.2A$A4.A3.3A9.3A9.3A9.3A9.3A$2A$.3A!

Code: Select all

x = 37, y = 40, rule = B19YL
3.5A$2.A4.A$2.2A$3.3A2$2A3.2A$2A3.2A$.2A.2A4$6.2A3.2A$6.2A3.2A$7.2A
.2A4$12.2A3.2A$12.2A3.2A$13.2A.2A4$18.2A3.2A$18.2A3.2A$19.2A.2A4$24.
2A3.2A$24.2A3.2A$25.2A.2A4$26.3A.2A3.2A$25.2A.A7.A$24.A$24.2A.2A$25.
3A3.3A!

Code: Select all

x = 77, y = 60, rule = B19YL
69.5A$68.A3.2A$67.2A3.A$67.3A5.2A$33.5A7.5A7.5A7.A6.A$33.A4.A6.A4.A
6.A4.A6.A$37.2A10.2A10.2A$35.3A9.3A9.3A9.3A$29.2A3.2A$29.2A3.2A$30.
2A.2A4$35.2A3.2A$35.2A3.2A$36.2A.2A4$41.2A3.2A$41.2A3.2A$42.2A.2A4$
47.2A3.2A$47.2A3.2A$48.2A.2A4$53.2A3.2A$4.5A7.5A7.5A7.5A7.A6.A$4.A4.
A6.A4.A6.A4.A6.A4.A6.A$8.2A10.2A10.2A10.2A$6.3A9.3A9.3A9.3A9.3A$2A3.
2A$2A3.2A$.2A.2A4$6.2A3.2A$6.2A3.2A$7.2A.2A4$12.2A3.2A$12.2A3.2A$13.
2A.2A4$14.3A.2A3.2A$13.2A.A7.A$12.A$12.2A.2A$13.3A3.3A!
Brian Prentice

bprentice
Posts: 644
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Triangular neighbourhood rules

Post by bprentice » February 1st, 2020, 10:04 pm

muzik wrote:
February 1st, 2020, 7:15 pm
Triangular Vertices does not seem to support replicators.
This four state rule:

1.png
1.png (115.65 KiB) Viewed 1429 times

supports replicators! See ../Patterns/Rule Table/Rule 129 in:

http://bprentice.webenet.net/Triangular ... 20Cell.zip

Brian Prentice

bprentice
Posts: 644
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Triangular neighbourhood rules

Post by bprentice » February 3rd, 2020, 12:23 am

It is interesting to watch these rules evolve:

Code: Select all

x = 16, y = 4, rule = G6/B2367/S8LV:T1000,1000
.E.D.C.B.A$.E.DECDBCAB.A$4.E.DECDBCAB.A$7.E.D.C.B.A!

Code: Select all

x = 7, y = 4, rule = G5/B238/S4LV:T1000,1000
.2D$2.2C$3.2B$4.2A!

Code: Select all

x = 8, y = 2, rule = G5/B25/S369LV:T1000,1000
.D.C.B.A$.D.C.B.A!
Play some random fills on a torus.

Brian Prentice

Post Reply