State symmetry

For discussion of other cellular automata.
Post Reply
Keiji
Posts: 58
Joined: May 11th, 2010, 5:32 pm

State symmetry

Post by Keiji »

I was just thinking about the possibility of implementing some kind of "state symmetry" in the ruletable format.

Basically, it would allow you to have a single state which would have "varieties" for north, south, east or west if it were fourfold, or horizontal and vertical if it were twofold. Then a transition could be defined from one state to another if there was a certain variety of a certain state in a certain point in the neighborhood.

For example, take von Neumann, with 29 states. The 16 directional states could be replaced with 4 fourfold states. However, the construction method would have to change: there would be one code for constructing an arrow in the same direction, another for a left turn, another for a right turn, and another for backwards. A tentative ruletable for this would look as follows (I'm only showing the rules for construction here and no others, just to show the difference produced by having state symmetry):

Code: Select all

# 1: sensitised
# 2: sensitised transmission
# 3: sensitised transmission normal
# 4: sensitised transmission special
# 5: sensitised transmission normal straight
# 6: sensitised transmission normal turn
# 7: sensitised transmission special straight
# 8: sensitised transmission special turn
# 9: transmission normal inactive
# 10: transmission normal active
# 11: transmission special inactive
# 12: transmission special active
# 13: confluent quiescent
# 14: confluent excited
# 15: confluent quiescent active
# 16: confluent excited active

# C,N,E,S,W,C'
n_states:17
neighborhood:vonNeumann
symmetries:rotate4

statesym,1-12:4

var a={0,1,2,3}
var b={10,12}

0,b.a,0,0,0,1.a

1.a,0,0,0,0,13
1.a,b.a,0,0,0,2.a
2.a,0,0,0,0,3.a
2.a,b.a,0,0,0,4.a
3.a,0,0,0,0,5.a
3.a,b.a,0,0,0,6.a
4.a,0,0,0,0,7.a
4.a,b.a,0,0,0,8.a
5.a,0,0,0,0,9.a
5.a,b.a,0,0,0,9.a+2
6.a,0,0,0,0,9.a+1
6.a,b.a,0,0,0,9.a+3
7.a,0,0,0,0,11.a
7.a,b.a,0,0,0,11.a+2
8.a,0,0,0,0,11.a+1
8.a,b.a,0,0,0,11.a+3
The statesym line says states 1 to 12 all have fourfold symmetry, variable a is used bound for the direction of any signal which is inherited by the cell being constructed. I've used . to indicate a variation of a state, and + to indicate addition modulo 4 to the variation itself. So as you can see this allows the inputs 10 for confluent, 11000 for normal straight, 11001 for normal reverse, 11010 for normal left turn (assuming addition goes counterclockwise), 11011 for normal right turn, 11100 for special straight and so forth.

Hopefully you'll understand what I'm getting at here, and perhaps it will be of some use - the most annoying thing IMO about JvN is that you cannot just rotate a region and expect it to work, as not only are the states different but the construction codes are also different. Using state symmetry, Golly will be able to "rotate" the cells as well as the arrangements of the cells for you, and the orientation is not of any concern to the user.
Last edited by Keiji on June 14th, 2010, 11:56 pm, edited 1 time in total.
Image
This is why signature character limits are pointless.
Axaj
Posts: 231
Joined: September 26th, 2009, 12:23 am

Re: State symmetry

Post by Axaj »

The idea is sound, but would most likely be better done by using a python script that changes the states to their appropriate rotated form; a more efficient approach would to just have a line in the rule table/tree with the name of the python script that changes the states to match the rotation, but I don't think that's possible by the way rule tables are processed. There could be an option in the Golly preferences that you would use in the same fashion; name the python script and the rule table/tree and it can process it when you rotate.
Image
Keiji
Posts: 58
Joined: May 11th, 2010, 5:32 pm

Re: State symmetry

Post by Keiji »

Well yes, it would be far simpler for the Golly team to just add an option to run a script when you rotate an area. However, doing the full state-symmetry idea would also let you cut down on the size and complexity of the ruletable.
Image
This is why signature character limits are pointless.
User avatar
apg
Moderator
Posts: 3007
Joined: June 1st, 2009, 4:32 pm

Re: State symmetry

Post by apg »

there would be one code for constructing an arrow in the same direction, another for a left turn, another for a right turn, and another for backwards.
Yes, it's called Hutton32.
What do you do with ill crystallographers? Take them to the mono-clinic!
Keiji
Posts: 58
Joined: May 11th, 2010, 5:32 pm

Re: State symmetry

Post by Keiji »

Oh! Well, thank you for that piece of information. I'm glad someone thought to implement that. It'd still be nice to rotate directional states in Golly, though.
Image
This is why signature character limits are pointless.
Post Reply