Lines

For discussion of other cellular automata.
Post Reply
twinb7
Posts: 192
Joined: February 11th, 2014, 8:08 pm
Location: Ames, Iowa

Lines

Post by twinb7 »

I was putting together a quick cellular automata, and it doesn't seem to work right. Or at least, how I want it to.

These two patterns should behave identically:

Code: Select all

x = 30, y = 63, rule = Lines
9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$
9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$9.B$
9.B$9.B$9.B$9.B$9.B$8.AB$7.B.B$9.B$9.B18$A$.B$30A!
Here's the rule table:

Code: Select all

@RULE Lines
@TABLE
n_states:4
neighborhood: vonNeumann
symmetries: reflect_horizontal
#0: dead
#1: horizontal
#2: vertical
#3: cross
var a1={0,1,2,3}
var a2=a1
var a3=a1
var a4=a1
var a5=a1
var L1={1,2,3}
var L2=L1
var L3=L1
var L4=L1
var L5=L1
var h1={1,3}
var h2=h1
var h3=h1
var v1={2,3}
var v2=v1
var v3=v1
L1,L2,L3,L4,L5,0
0,3,a1,a2,a3,2
0,a1,3,a2,a3,1
0,a1,a2,3,a3,2
0,v1,h1,0,0,3
0,0,0,v1,h1,3
0,v1,L1,0,0,1
0,v1,0,L1,0,1
0,L1,0,v1,0,1
0,0,L1,v1,0,1
0,h1,L1,0,0,2
0,h1,0,L1,0,2
0,L1,0,h1,0,2
0,0,L1,h1,0,2
h1,a1,h2,a2,a3,h1
v1,v2,a1,a2,a3,v1
v1,a1,a2,v2,a3,v1
a1,a2,a3,a4,a5,0

@COLORS

0 48 48 48
1 255 0 0
2 255 127 0
3 255 255 0

@ICONS

XPM
/* width height num_colors chars_per_pixel */
"31 93 4 1"
/* colors */
". c #303030"
"B c #FF0000"
"C c #FF7F00"
"D c #FFFF00"
/* icon for state 1 */
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
/* icon for state 2 */
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
".............CCCCC............."
/* icon for state 3 */
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."
".............DDDDD............."

I want them both to behave like on the bottom... Any help? I'm not even sure what the rules are anymore, I've been lost in the table for too long. Basically, look at the icons: what symmetry group would be best if I want to preserve the information of which way the lines are facing, if it is or isn't facing towards the square?
User avatar
dvgrn
Moderator
Posts: 12049
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Lines

Post by dvgrn »

twinb7 wrote:These two patterns should behave identically..."
By "identically" do you mean that everything should look the same -- so state 1 takes the place of state 2 everywhere, and vice versa? Do you want these two-cell objects to be able to travel along lines in all four directions?
twinb7 wrote:Basically, look at the icons: what symmetry group would be best if I want to preserve the information of which way the lines are facing, if it is or isn't facing towards the square?
I'm not sure what "the square" is here, but I think the basic problem shows up right away, at T=1. If you have a neighborhood like N=0, E=1, S=2, W=0, how can you tell if you have a west-traveling tag on a horizontal line, or a north-traveling tag on a vertical line?

Symmetry groups won't help you here, because you have to transition to two different cell states in those two cases -- but you can't tell them apart if you only know those four neighbors. You'd need a Moore neighborhood to find out what the SE cell state is -- but that might end up being a much more complicated rule.
wildmyron
Posts: 1572
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Lines

Post by wildmyron »

twinb7 wrote:I want them both to behave like on the bottom... Any help? I'm not even sure what the rules are anymore, I've been lost in the table for too long. Basically, look at the icons: what symmetry group would be best if I want to preserve the information of which way the lines are facing, if it is or isn't facing towards the square?
I had a brief look at this because it seemed like an interesting puzzle. I suspect that the symmetry you are looking for in the rule table is "reflect" i.e. you want to reflect both in horizontal and in vertical. This doesn't seem to be supported by golly, so the rule table will need to be written out more completely. As to the symmetry group of the automata itself, I'm not sure I really understand what you mean by
twinb7 wrote:... preserve the information of which way the lines are facing, if it is or isn't facing towards the square?
For example, consider the following transition required to make the lower pattern work (ignore ' marks required for formatting):

Code: Select all

'  .      . 
' |.. -> .|.
'  _      _ 
For the centre cell on the left, no lines are pointing to it and yet it turns on. (Ignore new values of surrounding cells which are of course dependent on larger neighbourhood.)

By square, I presume you mean cell, is that right?

Unlike Dave, I think you can do what you want, because it's the combination of line and cross which are travelling. However, I think it would be easiest to ignore symmetry options in golly and explicitly define rules. It did however seem to me that there were a large number of states which satisfied more than one rule, so you would need to be careful with precedence.

Edit 1: Replace Moore neighbourhood in diagram with von Neumann
Edit 2: On reflection, I think the ambiguity actually will prevent you from doing what you want, precisely because of the example I gave. In your lower example where the vertical line moves along the horizontal line, an empty cell becomes vertical. But for the other case where you want a horizontal line to move along the vertical line, you would need the same neighbourhood configuration to result in a horizontal line instead of vertical. (This is true for the reflected version of your vertical example). Perhaps you can achieve what you want with a Moore neighbourhood instead.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by speedydelete.

Semi-active here - recovering from a severe case of LWTDS.
Post Reply