Hexagonal block CA
Hexagonal block CA
I had this thought playing around with face-centered cubic packings of rhombic dodecahedrons, which you can see in this 3D print model: https://www.printables.com/model/159006 ... ace-center
My goal was initially to embed a Margolus CA (probably Critters) as constraints on the top and bottom of the cells of an FCC, which emulates Margolus when they are stacked from a square base like this: Calcyman pointed this out a few years ago. I already have flat snap tiles for this rule, but I think the FCC approach is more elegant and plan to get back to it.
On the way I started to consider the tilted packing, starting with a triangular base. If you look down, you see this: And if you squint just a little, it's a block CA architecture in which the neighborhoods are the 6 triangles of a hexagon. There are three places to center them, and in an FCC packing, they cycle through them.
In the above diagram, start with hexes with red circles at the center. They are outlined in bold edges. You can apply a rule to bit values in the triangles, and it is a reversible rule if you use a permutation of the 64 possibilities. Alternatively you can see this by coloring the edges of each hex cell as on the right. I'm not sure which is a better visualization.
Next do the same with green-centered hexes, next with blue-centered hexes, and then return to red. I think there should be no problem realizing these with geometry, though you will need to split the rhombic faces into triangles.
Having a neighborhood with 64 states increases the space of reversible rules substantially from 16! to 64!. I'm am not sure what's out there and would probably need to put aside some other work to look into it.
Has anyone explored this? Also, I don't think there's a fatal flaw in this idea that would make it impossible, but let me know if you see one.
My goal was initially to embed a Margolus CA (probably Critters) as constraints on the top and bottom of the cells of an FCC, which emulates Margolus when they are stacked from a square base like this: Calcyman pointed this out a few years ago. I already have flat snap tiles for this rule, but I think the FCC approach is more elegant and plan to get back to it.
On the way I started to consider the tilted packing, starting with a triangular base. If you look down, you see this: And if you squint just a little, it's a block CA architecture in which the neighborhoods are the 6 triangles of a hexagon. There are three places to center them, and in an FCC packing, they cycle through them.
In the above diagram, start with hexes with red circles at the center. They are outlined in bold edges. You can apply a rule to bit values in the triangles, and it is a reversible rule if you use a permutation of the 64 possibilities. Alternatively you can see this by coloring the edges of each hex cell as on the right. I'm not sure which is a better visualization.
Next do the same with green-centered hexes, next with blue-centered hexes, and then return to red. I think there should be no problem realizing these with geometry, though you will need to split the rhombic faces into triangles.
Having a neighborhood with 64 states increases the space of reversible rules substantially from 16! to 64!. I'm am not sure what's out there and would probably need to put aside some other work to look into it.
Has anyone explored this? Also, I don't think there's a fatal flaw in this idea that would make it impossible, but let me know if you see one.
Re: Hexagonal block CA
It would be nice to have self-inverse rules as well. That way, you can reverse an a-b-c, a-b-c, ... cycle just by switching to c-b-a, c-b-a, ...
Unlike Margolus neighborhoods, there is already an unavoidable chirality when you choose the sequence. But suppose you require the rules to be D6-symmetrical with respect to rotation and flips and also preserving the cell count. Now you're really limited in what you can do.
If you have 0 or 6 on cells, you can only use the identity. If you have 1 or 5 on, you need identity or a flip to the opposite position. With 2 or 4, it could already be mirror-symmetric and you'd have to use identity, so I think for the other cases, you are limited to identity or a flip. For 3, you could do bit inverse and there may be others.
It would be interesting to find a rule as interesting as Critters with these constraints. If you allow chirality but keep count conservation, there are many other possibilities such as rotating a single cell clockwise or counterclockwise but then you also lose the self-inverse property.
I haven't thought about it beyond this and there may be mistakes above.
Unlike Margolus neighborhoods, there is already an unavoidable chirality when you choose the sequence. But suppose you require the rules to be D6-symmetrical with respect to rotation and flips and also preserving the cell count. Now you're really limited in what you can do.
If you have 0 or 6 on cells, you can only use the identity. If you have 1 or 5 on, you need identity or a flip to the opposite position. With 2 or 4, it could already be mirror-symmetric and you'd have to use identity, so I think for the other cases, you are limited to identity or a flip. For 3, you could do bit inverse and there may be others.
It would be interesting to find a rule as interesting as Critters with these constraints. If you allow chirality but keep count conservation, there are many other possibilities such as rotating a single cell clockwise or counterclockwise but then you also lose the self-inverse property.
I haven't thought about it beyond this and there may be mistakes above.
Re: Hexagonal block CA
I worked this out on paper myself before getting into a discussion with ChatGPT about it, but I relied on it for the write-up below before realizing I needed to correct or at least clarify the direction of axes. I think this works.
This is a rabbit hole, but it should not be too hard to prototype some rules in Python code.
ChatGPT writeup (mostly)
Here is how to get a 3-phase ABC partition (instead of Margolus’ 2-phase) while keeping everything indexable in a simple 3D array.
First divide unit squares along the same NW–SE diagonal into right triangles that can be scaled to equilateral triangles for display. I'm going to assume that i is the row number increasing top to bottom and j is the column number increasing left to right.
The array is:
Phase coloring (mod 3)
Define
This produces the repeating pattern (again, i is row top to bottom, j is column left to right)
So the lattice splits into 3 cosets (A, B, C).
Cycling ABCABC… corresponds to shifting the origin through these cosets.
Disjoint neighborhood lattice
Neighborhood origins form an index-3 sublattice generated by:
determinant = 2*2 - 1*1 = 3
So same-phase disjoint neighbors of (i,j) are:
Any same-phase origin is:
for integers a,b.
The 3 phase offsets
One convenient choice of coset representatives:
So ABC cycling corresponds to shifting the neighborhood origin:
The 6 triangles of one neighborhood
For a neighborhood with upper-left square corner (i,j),
the 6 triangles in clockwise order are:
This forms a 6-cycle in the triangular adjacency graph (a “hex” in the triangulated lattice).
Writing CA code for it (my thoughts, not ChatGPT)
Without optimizing it for sparsity, I would begin by enforcing D6 symmetry on the neighborhoods. The simplest way is to implement the rules for symmetry classes and then generate a lookup table, which will have just 64 values. So the only significant code here is to get the cell values and pack them into keys to do lookups. We would do this starting from (0,0), (0,1), (1,1) offsets.
Maybe we're actually better off just grabbing all 8 triangles (or 4 squares with 2 bit packed representation). Then we can do lookups in a still trivially small 256 value table. The problem here is we would need to mask to avoid overwriting values in squares that overlap neighborhoods, so maybe not.
This is a rabbit hole, but it should not be too hard to prototype some rules in Python code.
ChatGPT writeup (mostly)
Here is how to get a 3-phase ABC partition (instead of Margolus’ 2-phase) while keeping everything indexable in a simple 3D array.
First divide unit squares along the same NW–SE diagonal into right triangles that can be scaled to equilateral triangles for display. I'm going to assume that i is the row number increasing top to bottom and j is the column number increasing left to right.
The array is:
Code: Select all
A[i][j][t]
i,j = square coordinates
t=0 = bottom triangle
t=1 = top triangle
Define
Code: Select all
phase(i,j) = (i + j) % 3
Code: Select all
0 1 2 0 1 2
1 2 0 1 2 0
2 0 1 2 0 1
Cycling ABCABC… corresponds to shifting the origin through these cosets.
Disjoint neighborhood lattice
Neighborhood origins form an index-3 sublattice generated by:
Code: Select all
v1 = (2,1)
v2 = (1,2)
So same-phase disjoint neighbors of (i,j) are:
Code: Select all
(i+2, j+1)
(i+1, j+2)
Code: Select all
(i,j) + a*(2,1) + b*(1,2)
The 3 phase offsets
One convenient choice of coset representatives:
Code: Select all
A: (0,0)
B: (0,1)
C: (1,1)
Code: Select all
(i,j) -> (i,j+1) -> (i+1,j+1) -> ...
For a neighborhood with upper-left square corner (i,j),
the 6 triangles in clockwise order are:
Code: Select all
(i, j, 0)
(i, j, 1)
(i, j+1, 0)
(i+1, j+1, 1)
(i+1, j+1, 0)
(i+1, j, 1)
Writing CA code for it (my thoughts, not ChatGPT)
Without optimizing it for sparsity, I would begin by enforcing D6 symmetry on the neighborhoods. The simplest way is to implement the rules for symmetry classes and then generate a lookup table, which will have just 64 values. So the only significant code here is to get the cell values and pack them into keys to do lookups. We would do this starting from (0,0), (0,1), (1,1) offsets.
Maybe we're actually better off just grabbing all 8 triangles (or 4 squares with 2 bit packed representation). Then we can do lookups in a still trivially small 256 value table. The problem here is we would need to mask to avoid overwriting values in squares that overlap neighborhoods, so maybe not.
Last edited by pcallahan on February 14th, 2026, 1:55 pm, edited 2 times in total.
Re: Hexagonal block CA
If I am correct about the neighborhood (I assume that it's vertex-centered) then below are the isotropic transitions for that:
If instead you are using an edge-centered 6-cell neighborhood, then here are the isotropic transitions (rotate2reflect) for that neighborhood:
If none of the neighborhoods work, please let me know! It would be helpful to provide a GIF animation of the 3-cycle so that it's easier for me to understand.
Code: Select all
# 6 neighbors
# 21 isotropic transitions (listed below)
x = 3, y = 3, rule = B/S0123456H
3o$b2o$2bo!Code: Select all
x = 27, y = 27, rule = 0123456//3H
3B.3B.3B.A2B.3A.3A.3A$.2B2.2B2.AB2.AB2.BA2.2A2.2A$2.B3.A3.A3.A3.B3.B3.
A2$6.3B.A2B.BAB.B2A.3A$7.AB2.2B2.AB2.2A2.BA$8.B3.A3.A3.B3.A2$12.BAB.2B
A.ABA$13.2B2.AB2.2A$14.A3.A3.B2$14.BAB.3B.ABA$15.AB2.2A2.BA$16.B3.A3.
A2$20.2AB$21.2B$22.A2$22.ABA$23.2B$24.A2$24.BAB$25.2A$26.B!Code: Select all
x = 36, y = 31, rule = 0123456//3H
.B4.B4.B4.B4.A4.A4.A$4B.A3B.2A2B.3AB.2B2A.B3A.4A$2.B4.B4.B4.B4.A4.A4.
A2$8.B4.B4.B4.A4.A$7.BA2B.A3B.2ABA.B3A.AB2A$9.B4.A4.B4.B4.A2$10.B4.B4.
B4.A4.A$9.4B.ABAB.2A2B.BABA.4A$11.A4.B4.A4.A4.B2$17.B4.B4.A$16.A2BA.A
BAB.B2AB$18.B4.A4.A2$19.B4.B4.A$18.B2AB.A2BA.A2BA$20.B4.A4.A2$21.B4.B
4.A$20.BA2B.B2AB.AB2A$22.A4.A4.B2$23.A4.A4.B$22.4B.A3B.4A$24.A4.A4.B2$
30.A$29.BA2B$31.A!Code: Select all
# 6 neighbors
# 30 isotropic transitions (listed below)
x = 4, y = 3, rule = B/S0123456H
bo$4o$2bo!Re: Hexagonal block CA
I don't think it's any of those. You can see the final illustration on viewtopic.php?f=11&t=7190&p=225384#p225165R2INT wrote: February 14th, 2026, 12:31 am If I am correct about the neighborhood (I assume that it's vertex-centered) then below are the isotropic transitions for that:
The neighborhood consists of the six triangles that make up a hexagon. So the grid itself is triangular, even though I'm calling it a hexagonal block CA. The embedding to an array with upper and lower triangles is a precise definition.
Re: Hexagonal block CA
Thanks for the correction! I assume that this neighborhood is triangular; the transitions there are the same as the hexagonal transitions (but there are no births or survivals):pcallahan wrote: February 14th, 2026, 12:43 am [...]
I don't think it's any of those. You can see the final illustration on viewtopic.php?f=11&t=7190&p=225384#p225165
[...]
Code: Select all
# "Hexagonal" BCA, vertex-centered
# 2^13 = 8192 rules
x = 39, y = 11, rule = 0123//3LE
$3B3.3B3.3B3.3B3.2BA3.B2A3.3B$3B3.A2B3.2AB3.3A3.3A3.3A3.3B3$12.3B3.2B
A3.B2A$12.ABA3.2AB3.ABA3$12.2BA3.BAB3.B2A$12.A2B3.ABA3.2AB!