[Mathematica graphics functions for cellular automata] - A New Kind of Science: The NKS Forum

A New Kind of Science: The NKS Forum

Pages:1



Mathematica graphics functions for cellular automata

(Click here to view the original thread with full colors/images)



Posted by: Richard Phillips

Mathematica already has excellent builtin functions for plotting Cellular Automata and other NKS graphics.

When trying to plot CAs where the number of cells per inch approaches the screen resolution, the results may not look as good as usual. That is just a limitation of having to use pixels to display things.

The attached notebook contains two graphics functions that produce pictures of CAs with a whole number of screen pixels per CA cell, so that they always look really clear.

The first function produces pictures of a single matrix with a caption.

The second produces a grid of pictures, each with it's own caption. This is for showing multiple rules in an array.

The notebook also shows how the pictures can be exported to GIFs or JPEGs using Mathematica's Export function.



Posted by: Lawrence J. Thaden

Here are three examples of CAs developed using your downloaded code.



Posted by: Lawrence J. Thaden

Continued



Posted by: Lawrence J. Thaden

Continued



Posted by: Richard Phillips

Lawrence,

That looks like a very interesting rule.

Could you say what they are in more detail please?



Posted by: Lawrence J. Thaden

The rule addresses blocks of five cells. Each cell is restricted to five colors corresponding to integers 0 – 4. The left or right nearest neighbor block is randomly selected, and its cells are indexed by the cells of the block being updated. The result is then stored as the updated block.

For example:

Nearest neighboring block on left: {0, 1, 3, 3, 2}.

Nearest neighboring block on right: {1, 2, 4, 3, 0}.

Block before update: {4, 2, 0, 1, 3}.

Indexing when left neighbor is randomly selected: {0, 1, 3, 3, 2}[[{4, 2, 0, 1, 3}+1]].

Block after update: {2, 3, 0, 1, 3}.

Very soon after the initial conditions the blocks become all 0’s or 1’s or 2’s or 3’s or 4’s. And often pairs of adjacent blocks repeat over a region. For example a pair may be: {{0, 0 ,0, 0, 0}, {4, 4, 4, 4, 4}}, as in the example labeled “Simple Initials”. In this case the region appears checkered.

When the pairs of adjacent blocks do not differ, the colors of the regions appear solid.

In the special case, “Engineered Initials” I took the coefficients for permutation group S5 and randomized their order and then replaced the one just left of center with coefficients {4, 4, 4, 4, 4}.

Since indexing the coefficients of the permutation group S5 always gives another member of the permutation group, the {4, 4, 4, 4, 4}, which is not a member of S5, was required to get the rule to start turning the blocks into all 0’s or 1s or 2’s or 3’s or 4’s. It acted like a seed for the process. But it works out from where it is placed. So only slowly do all the bocks become homogenous. The two diagonal bands are due to this slowness. In this space only a single member of a pair of blocks seems to become homogenous.

I do not understand what is happening exactly. And especially intriguing is how the bands appear to have left chirality, even though selection of left or right neighbor is random.

Your NiceCaptionedRaster code clearly makes a difference, especially within the bands.

Thanks.



Posted by: Lawrence J. Thaden

Here is the notebook.



Posted by: Lawrence J. Thaden

In the above sample labeled “Engineered Initials” the graph manifested a left chirality.

By varying the rule and the number of neighbors it is possible to achieve a right chirality.

Here is an example using the same initial conditions, but making the rule be: Let the block to be updated index either the next nearest right neighbor or the nearest left neighbor. Again the choice made is random. (The initial conditions are the same in the sense that they are a random ordering of the members of permutation group S5 with a non-member seed replacing the S5 member just left of center.)

There are some solid colors and checkered patterns. Throughout composition of a step is of triplets of blocks of five cells. As soon as it gets organized each block is homogenous. A checkered triplet either has two blocks the same next to one that is different or a different one in between two that are the same. Solid triplets have three adjacent blocks the same.

The CA ends with a loop of three steps composed of repeating triplets of homogenous blocks like this:

loop step 1: 2s, 0s, 1s;
loop step 2: 1s, 2s, 0s;
loop step 3: 0s, 1s, 2s.



Posted by: Lawrence J. Thaden

A close examination of the graph labeled Engineered Initials shows that left chirality only applies to the bands during self-organization. Once the blocks have attained homogeneity the behavior is predominately characterized by neither left nor right chirality.

By contrast, the graph labeled Example with Right Chirality shows the right chiral characteristic once the blocks of cells have been homogenously organized. However, from the start it moves out from the center both to the left and to the right as it becomes more and more organized. Additionally, it appears to be moving faster in a left chiral direction. This can be verified by checking how it wraps around on the right and begins a second band that then intercepts the oppositely moving organization.

(Chirality: read left and right hand rule of thumb as in spin designation. Thumb points down the graph.)





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