[Hybrid Classes] - A New Kind of Science: The NKS ForumA New Kind of Science: The NKS Forum
Pages:1
Hybrid Classes
(Click here to view the original thread with full colors/images)
Posted by: Alastair Hewitt
So yesterday I tried mixing rule 110 and 30 to see what happened - basically is wasn't that interesting. I also tried mixing rule 110 with 124 (right hand 110) and it wasn't that interesting either (although someone thought they were cool - thanks Jesse!). However, what did turn out to be interesting was doing both of these:
I've gone though the permutations of alternating rule 110/124 and 30/86 (86 is the mirror image of 30). This means using four consecutive rules; one pair of symmetrical class 3s and one pair of symmetrical class 4s. Cutting a long story short, a class sequence with two of the same class followed by two of the other (4, 4, 3, 3) ends up looking like a class 3. However, things get interesting when you do one class followed by the other (4, 3, 4, 3).
What I seem to get is something that looks either like a cross between class 1 and 2, or a cross between a class 3 and 4. These are the two examples of class 1-2:
30 124 86 110 - like a series of tight chains zig-zagging down the inside the CA.
110 30 124 86 - like a herring-bone pattern either side of the center of the CA.
I use the term class 1-2 because they have a repeating pattern (like class 2), but it repeats every 4 steps (one sequence). For a one rule CA, a repeat every step (one sequence) is a class 1, hence the term class 1-2 (or should it be 1.5).
The most interesting sequence of four rules gives a class 3-4 appearance. There is a general randomness like class 3, but also some structure like a class 4. I've attached a 3000 step example using the following sequence:
30 110 86 124
Posted by: Alastair Hewitt
This is a really interesting hybrid (class 3-4) CA. It's along the lines of the one above, but using five pairs of rules:
124 30 110 86 110 86 124 30 110 86
The attached example shows an emergent random pattern on the right that keeps repeating, but growing larger.
This example can be extended by simply adding new pairs. However, adding another 110 86 gives a very different result than adding a 124 30.
Posted by: Jason Cawley
You can get a completely general Mathematica set up for exploring these with a few additional lines of code. They add a new form the ICA function, ICAG (for general), that takes a list of rules of any length. The interaction bit switches among them for that step. They work basically the same as the code in the simpler case of crossing pairs of ECAs.
The first line just makes a rule table from an ECA number. It is separated and modular, so if you want to build your rule differently you can.
rl[num_]:= MapThread[Rule,{Tuples[{1,0},3],IntegerDigits[num,2,2^3]},1]
Next we want to perform one step of application of a rule, to be selected out of the rule list we are given, according to the choice argument for that step.
ICAGStep[rules_List, init_, choice_]:= #&@Partition[init,3,1,2]/. rl[ rules[[choice+1]] ]
Notice, the partition is giving us local neighbors where we will apply the rule. rl is the previous function, turning a number into a rule table. The number to give it is determined by the choice-th rule in the list. Next we just want to string a bunch of those steps together, which in Mathematica we do with FoldList.
ICAGEvolveList[rules_List,init_List, interact_List]:=
FoldList[ICAGStep[rules,#1,#2]&,init, interact]
Now, ICAGEvolveList just needs a list of rules - like
{124,30,110,86}
- then a starting condition -
Table[Random[Integer],{100}]
- or a single black cell if you prefer - and last an "interaction condition" - an order to apply which rule. You might use
Flatten[Table[{1,0,3,2},{25}]]
(your 30-124-86-110 case). You could explore all the cyclic ones, enumerated by
IntegerDigits[u,3,4]
with u varying from 0 to 3^4-1, and then put in place of that {1,0,3,2} in the interactioncondition line. You can also try irregular mixes, by using as an interaction condition e.g.
Table[Random[Integer,3],{100}]
Write even moderately modular code, and generalizations are straightforward. In Mathematica, you then have all the tools you need to exhaustive explore the resulting space.
I hope this is helpful.
Posted by: Jesse Nochella
You can get even more general than that.
Although I don't have the power to crank out a notebook with examples, with words at least, I can say that all ICA interaction conditions can be set up in an even more general way, where every cell can be accounted for independently and conveniently using an adapted form of the arbitrary coordinate system you use to spell out initial conditions in Mathematica's built in CellularAutomaton function. With something like that, you could specify arbitrary rule mappings right in the rnum slot.
You could specify any ICA, all the way up to having a different rule applied to every cell every step (which I think would produce white noise), and down to just a normal CA where the same rule is applied to all cells.
The adapted notation could be used to handle multiple dimensions, not just the one needed for the inital conditions. It might look something like one of these:
WayGeneralizedCellularAutomaton[{{110},{124,110}},init,steps]
WGCA[{{186, 232, 195, 252, 42, 247, 153, 103, 85, 123},
{65, 21, 213, 99, 18, 15, 101, 70, 123, 36},
{249, 38, 101, 19, 167, 143, 66, 101, 4, 18},
{185, 65, 66, 201, 163, 57, 134, 18, 137, 178},
{223, 50, 213, 23, 143, 114, 131, 221, 74, 237},
{28, 173, 147, 7, 202, 249, 54, 15, 188, 28},
{212, 94, 238, 228, 74, 157, 100, 173, 23, 231},
{82, 126, 196, 155, 132, 213, 40, 67, 73, 128},
{95, 84, 111, 74, 211, 81, 199, 77, 106, 67},
{219, 251, 212, 127, 164, 253, 43, 39, 243, 161}},init,steps]
I know, there's some conflict already with the way cellular automaton rules are specified, so {49,2,2} could either mean the standard k=2 r=2 code 49 cellular automaton or, side by side, applying elementary rules 49, then 2, then 2 again.
I don't know a way around this. The best I can come up with is using sparse arrays in the form of something like SparseArray@{{i_EvenQ, j_}->110,{_}->124} or SparseArray@{{1,1}->186,...,{7,4}->155...}. But it turns out that you can't specify a negative number as a coordinate in a sparse array. So as for workarounds, thats as far as I've gone.
It so happens that this idea is what I came up with for a better way to specify perturbation maps in what I call live cellular automata. Where the function would look just like an ordinary CellularAutomaton function, but there's the extended capability of being able to specify initial conditions in two dimensions, or in general one dimension higher than the cellular automaton rule being applied. That way, your conditions specify, instead of just the initial conditions, the perturbation that occurs on the given background throughout time.
There's no conflict there, All you'd need to is nest your arbitrary coordinates an another list all the way up to one dimension higher than the rule and you'd be all set. And as for space of limited size, something like {{1,0,_,_,_,_,1,0,1}...} I think would work, where _ means no perturbation and any cells not specified would remain the default background (_ usually). The same could go for the enhanced rnum slot.
All in all, if it makes sense, and if there's no conflict in doing so, both the ideas of cellular automata with rule control, and cellular automata with live input transparently imbued into the already existing CellularAutomaton function I think would blow the roof off.
The only thing to generalize after that would be the physical layout of space, where any undirected neighbor-valent network layout could be supported. But here you are pushing the limit of what you can call a cellular automaton. To me the 'cellular' part tells us that we're still in-bounds, but I don't know how CellularAutomaton could manage to pull off functionality for that too without changing a few things.
All these things seem like great ideas, but right now I'm just lacking the skills to whip'em out as I like. But I'll be working on them like I've been working on LCA's nonetheless.
Posted by: Jason Cawley
You could write such code, but it doesn't exist at the moment. If you give CellularAutomaton variables it isn't expecting right now, it will just cough at you. Better to write your own function, which isn't hard.
You could try some hacky way using the functional form, building a rule list as with rl or rlno in my previous two notebooks, with the reduction=evaluation to a particular function nested inside your "first argument". But it is much cleaner to write your own step function and nestlist it yourself.
As for generalized networks, for regular ones you might use a long range rule that reaches the whole array width, and then specify a kernel that mostly has zeros in it. Still CA will replicate the pattern of "neighbors that matter" - those just don't need to be remotely local, just regular. Once you are varying them independently, though, it is easier to have a matrix of connections. You assume an all to all connected set, equals an array of all 1s. When instead two positions aren't connected, their corresponding entry is a zero. Directed graphs needn't be symmetric about their main diagonal.
If you want to specify not only connections but weights, you want a matrix (typically mostly zeros) for each node. You can give these connections kernel weights the same way CellularAutomaton does e.g. 1 for the cell itself and 2s for others in its neighborhood, to get an outer totalistic rule on an irregular graph.
But one of the points of NKS is one doesn't need arbitrary amounts of "hair" to get interesting behavior. ICAs are interesting as minimal extentions of CAs. They show some fairly new things, though their overall complexity classes are the same. Expecting to find brand new vistas by adding another five layers of complexity misses the universality point - you aren't going to get something fundamentally new, when you are already past the universality threshold.
There are modeling purposes for which specific additions are natural. Control questions, environmental interaction questions, selection or competition questions in an irreducibly complex world. Those are subjects well worth exploring, for which some of these critters are natural idealizations.
Posted by: Alastair Hewitt
This CA is pretty interesting. It uses 8 pairs of rules (repeating sequence of 16) as follows:
124 30
110 86
110 86
124 30
110 86
124 30
110 86
124 30
Posted by: Alastair Hewitt
The last example can be rewritten as follows:
124 30 110 86
110 86 124 30
110 86 124 30
110 86 124 30
This is the original 124 30 110 86 rule sequence followed by three copies of its "mirror" version; the 124 30 110 86 CA starts out going to the left, and the 110 86 124 30 CA starts out going to the right (mirror image). So labeling the first one L and the second one R, the above sequence can be written: L, R, R, R.
The interesting feature of these CAs is their hybrid behavior. Combinations of these L and R rule sequences result in some fairly long sequences in where the randomness starts to die out. Ultimately it propagates back in, but the rate is low enough to keep the random central region fairly narrow.
Posted by: AnthonyMartin
These pictures are very nice. And big.
Posted by: Alastair Hewitt
This is an example of the sequence L, R, R, R, L, R, R, L. This is asymmetrical, but has a central random region.
Posted by: Alastair Hewitt
An example of the L and R combinations described above, I found a nice example with a central random region that grows slowly in width. This one is five L's followed by five R's (there is another one with two L's and two R's).
This CA is therefore generated using the following sequence of rules:
124 30 110 86
124 30 110 86
124 30 110 86
124 30 110 86
124 30 110 86
110 86 124 30
110 86 124 30
110 86 124 30
110 86 124 30
110 86 124 30
I attached the central (1000 pixel wide) region of a 4000 step example.
Posted by: Alastair Hewitt
This is the nicest example of the L and R combinations. It is two L's and two R's repeated; the rule sequence is as follows:
124 30 110 86
124 30 110 86
110 86 124 30
110 86 124 30
I attached the central (1600 pixel wide) region of a 4000 step example. You can cut out a section and use it as a great NKS desktop wallpaper. Enjoy!
Forum Sponsored by Wolfram Research
© 2004-2008 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