[Check this out!] - A New Kind of Science: The NKS ForumA New Kind of Science: The NKS Forum
Pages:1
Check this out!
(Click here to view the original thread with full colors/images)
Posted by: Lawrence J. Thaden
Here is a fascinating little three color rule. It usually evolves persistent structures after just ten or fewer steps, starting from random initial conditions.
Moreover, the persistent structures appear to always have the same number of steps. Yet none of them have the same pattern.
The rule is an algebraic expression: Mod[2 p + 2 q + r - 3 p r + s, 3].
Attached are the results from 64 consecutive evolutions of the rule. Only the persistent structures are shown.
Posted by: Jason Cawley
Simple question - if it is a nearest neighbor rule, what's s? Presumably p q and r are the neighborhood. Is s the step number? Or is it a range 1 1/2 rule? Or... Also, the full evolution as well as a "persistent structures only" plot would be nice.
Posted by: Lawrence J. Thaden
Jason,
p and q are the neighbors on the left and r and s are the neighbors on the right. The cell being updated doesn't participate.
I will post the code and full runs (transients and persistent structures) for another sample of runs sometime over the weekend.
Unfortunately, I closed Mathematica before listing the random initial conditions for the 64 samples presented in the graphic.
Posted by: Jason Cawley
Here is a notebook for exploring the sort of Mod rules Thaden is talking about. I hope it is useful.
Posted by: Lawrence J. Thaden
Jason,
Here are the CAs run in their entirety. I used your excellent code.
Note that the colors are different from those in the original post. Also the graphs are different because of random initial conditions.
However, observations about persistent structures of the same size but various patterns still hold.
Please note the modification to your code includes Richard Phillips graphics functions.
Posted by: Lawrence J. Thaden
Here is the modified code.
Posted by: Jason Cawley
Glad it helps. The next obvious thing to do is to get systematic about the "mod polynomial" used. E.g.
<<DiscreteMath`Combinatorica`
termsr1= Map[Apply[Times,#]&,Drop[Subsets[{q,r,s}],1]]
polys[colors_Integer] :=
Map[Times[termsr1,#]&, Tuples[Range[2 colors-1]-colors,7]]
That will generate all the polynominals with coefficients less than the number of colors, plus or minus, and with each site appearing at most once in a given term ( r times s is OK, but not r^2).
Thus e.g.
polys[2][[13]] gives {-q,-r,-s,-q r,0,0,-q r s}
That handles range 1. With r2k3, you have 5 sites to subset among, and with 3 colors coefficients ranging from -2 to +2, resulting in a huge number of rules. One can restrict oneself to cases with only a few terms by e.g. using a random Ksubset, as follows -
termsr2 = Map[Apply[Times, #] &, Drop[Subsets[{p, q, r, s, t}], 1]]
polyrange2[colors_Integer, terms_Integer] :=
With[{set = RandomKSubset[termsr2, terms]},
Map[Times[set, #] &, Tuples[Range[2 colors - 1] - colors, terms]]]
Then for example a slice of random r2k3 "poly mod" rules that have the same 2 terms (with all possible different coefficients from -2 to +2) can be specified as -
polyrange2[3, 2]
And returns something like -
{{-2 p, -2 p q t}, {-2 p, -p q t}, {-2 p, 0}, {-2 p, p q t}, {-2 p,
2 p q t}, {-p, -2 p q t}, {-p, -p q t}, {-p, 0}, {-p, p q t}, {-p,
2 p q t}, {0, -2 p q t}, {0, -p q t}, {0, 0}, {0, p q t}, {0,
2 p q t}, {p, -2 p q t}, {p, -p q t}, {p, 0}, {p, p q t}, {p,
2 p q t}, {2 p, -2 p q t}, {2 p, -p q t}, {2 p, 0}, {2 p, p q t}, {2 p, 2 p q t}}
Each term of which is a specific poly-mod rule, suitable for plugging into the "build a specific rule table" portion of the previous notebook.
I haven't looked at all of them, but my guess is you will see plenty of interesting stuff already in range 1, 3 colors. There are tens of thousands of those - 7 possible terms of the polynominal {q,r,s,qr,qs,rs,qrs} each with 5 possible coefficient values {-2,-1,0,1,2}, thus 5^7 or 78125 3-color, nearest neighbor "poly-mod rules".
That makes a digestible slice of 3 color rules.
Posted by: Lawrence J. Thaden
Jason,
I don’t know how to properly go about explaining, in terms of Ksubset and DiscreteMath`Combinatorica, the mod-poly rules that I am exploring.
However, I do intend to investigate some of the subsets you mention in your post using Ksubset and DiscreteMath`Combinatorica.
But since I have had some success finding interesting class four rules using a different procedure for generating the rules, I will attempt to describe how I am going about finding them.
At the bottom of this post are a few of the mod-poly rules that manifest behavior similar to that of the rule I posted previously. These rules plug in nicely to your code, and I hope others will find them as interesting as I do.
They are from a subset of 19683 unique rules formed by taking coefficients in the range 0 – 2 with these nine terms:
{p r, p s, p (1-r), q r, q s, q (1-r), (1-p) r, (1-p) s, 1},
where (1-p) and (1-r) are the modulo negatives for p and r. (See NKS book, p.869.)
There are no modulo negatives for q and s. That is, (1-q) and (1-s) are absent among the terms.
These two facts alone indicate the difficulty in applying the procedure you outline in your post to the effort described here. For you propose coefficients {-2, -1, 0, 1, 2}, whereas this system has the negative embedded in the term, and then only in two out of four terms. So negative coefficients are not allowed.
Also absent are the product terms: p q, r s, (1-p) q, and (1-r) s.
And (1-p) p and (1-r) r are absent, as well as p, q, r, and s.
There is no 0 term.
These mod-poly rules were then fully simplified using Mathematica. After which, many of the above excluded terms do appear in the polynomials.
With this set of rules, I began to systematically evolve each from the same set of initial conditions for 200 steps. This is a work in progress, and I am about one third the way through.
The initial conditions, somewhat arbitrarily chosen, are:
{2,0,0, 0,0,0, 2,0,2, 1,0,1, 0,0,0, 0,0,1, 0,0,0, 1,0,0, 1,2,0, 0,1,2, 0,0,2, 0,0,0}.
The rules call for assigning the left two neighbors to variables p and q of the modulo polynomial and the right two neighbors to r and s. When the modulo polynomial is simplified, the result is the value of the updated cell. This is the same result obtained with your code using p and q on the left, s and t on the right, and leaving r unassigned.
Afterwards, I visually examine each of the graphs to determine which ones end with these types of uniform sized, persistent structures.
Next, I verify that the graph is not just some anomaly. I do this by sampling the rule using random conditions. If the persistent structures show up in each of the samples, I consider the rule as a member of this subclass of class four rules.
The members of this subclass all have this characteristic: the shorter the transients in the samples, the greater the variety among the patterns of the persistent structures; conversely, the longer the transients, the greater the repetition of the same persistent structures among the samples.
Sameness is defined as equivalence of structure under synchronization of space or time. That is, two structures are equivalent if, by rotation of either the cells or the steps in one, a match can be found in the other.
The explanation for this characteristic is that, long transients consume the candidates from the pool of possibilities which would otherwise serve as initial conditions for persistent structures.
Incidentally, every so often the random sampling hits on an atypical persistent structure. It is characterized by its extreme length and intricately detailed, irregular but seemingly symmetric structure. I include one example in the attached graphic. It came from the rule: Mod[q (2 – r + s) + 2 (1 + r - p r + p s), 3] with initial conditions:
{0,2,0, 0,0,1, 1,1,1, 2,2,2, 2,2,2, 0,0,1, 0,0,2, 2,2,2, 2,2,1, 1,1,1, 0,0,0, 2,0,0}.
Some of the other mod-poly rules I have found are listed below:
Mod[p + q - 3 p r + 2 (r + s), 3]
Mod[1 - 2 (-1 + p) r + 2 p s + q (2 – r + s), 3]
Mod[1 + q + 2 r - 2 p r - q r + 2 p s + q s, 3]
Mod[2 + q + 2 r - 2 p r - q r + 2 p s + q s, 3]
Posted by: Lawrence J. Thaden
Here is the code I used to evolve samples with the above posted rules.
Notice in these examples the sensitivity to the number of cells in the initial conditions.
Posted by: Lawrence J. Thaden
If any attempt to recreate the graph for rule: Mod[q(2-r+s)+2(1+r-pr+p s),3] using Jason's code, you will probably get a graph like the one below.
To correct this, realign his output data with the following code:
JasonsCodeRealigned = Prepend[Table[RotateRight[data[[i+1]],i],{i, Length[data] - 1}], data[[1]];
After which, display[JasonsCodeRealigned] produces the correct graph.
It appears that each subsequent step of his output is rotated another cell to the left.
Forum Sponsored by Wolfram Research
© 2004-2009 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. |
Disclaimer
vB Easy Archive Final - Created by Xenon and modified/released by SkuZZy from the Job Openings