Very cool. Reminds me of shifted 225 combined with ordinary rule 225 (see e.g. p.58 ).
Compare this to the version where the total is renormalized so the argument to Sin ranges from 0 to 2Pi
ArrayPlot[
CellularAutomaton[{Sin[Total[N@#] 2 Pi/3] &, {}, 1}, {{1}, 0}, 250]]
That gives something random looking whereas renormalizing to make it range from 0 to Pi instead gives similar behavior. I wonder what the uniform regions are like.
This does not use Total
ArrayPlot[CellularAutomaton[{Fold[BesselJ, #] &, {}, 1}, {{1.}, 0}, 100]]
but looks conventional
This turns back to the Total
ArrayPlot[CellularAutomaton[{Total[
CoefficientList[Cyclotomic[Total[#], x], x]] &, {}, 1}, {{1}, 0},
200], ColorFunction -> Hue]
but has not found a convincing color function (yet)
because a ListPlot3D of it shows peaks around 2400
These are all good. The Standard Deviation one is like Juan’s above, and the second one is like Vitaliy’s.
The first one doesn’t ring any bells and looks like a new behavior to me.
The last one is an outer totalistic 7 color rule with only diagonal neighbors. I prefer your expression with trace (Tr), though it can also be written as
ArrayPlot[
CellularAutomaton[{3020027333325105171577645034668, {7, {{1, 0,
1}, {0, 2, 0}, {1, 0, 1}}}, {1, 1}}, {{{1}}, 0}, {{{20}}}]]
Nice. One thing apparent from the first picture is that it fades out on the top left diagonal. I like how you found the singularity-like behavior. Encouraging for the digital physics people who try to find CAs for the universe.
I like how you found the singularity-like behavior.
This one fades out more impressive.
ArrayPlot[CellularAutomaton[{Fold[BesselJ, #] &, {}, 1}, {{1.}, 1./(\[Pi] E)}, 100]]
A background 0 is too dry and this observation was shadowing in here by the Planck ground state idea (as an element of a functional space with eigenvalue != 0 (\frac{1}{2} \hbar \omega in a relevant case)); so one feels oneself seeing \frac{1}{\pi e} as an eigenvalue of a not formulated quantum problem … oh oh oh, today is Sunday …
By the way, Todd, did somebody at the Summer School jam into quantum cellular automata?
This decays fast
ArrayPlot[CellularAutomaton[{Mean[Fourier[#1]] &, {}, 1}, RandomComplex[{-(10 + I), 1 + 10 I}, 100], 100]]
sorry
Also a bit boring
ArrayPlot[
CellularAutomaton[{If[OddQ[#2],
GeometricMean[DeleteCases[#1, Chop[#] == 0 &]],
ContraharmonicMean[#1]] &, {}, 1}, RandomComplex[{-(10 + I), 1 + 10 I}, 100], 200]]
as seen here
Improving the Fourier a bit
ArrayPlot[
CellularAutomaton[{If[OddQ[#2],
Mean[Abs /@ Fourier[#1]],
Max[Abs /@ InverseFourier[#1]]] &, {}, 2}, RandomComplex[{-(10 + I), 1 + 10 I}, 100],
100]]
into
prime numbers have always their attraction
ArrayPlot[
CellularAutomaton[{If[OddQ[#2],
Mean[Abs /@ Fourier[#1]],
Max[Abs /@ InverseFourier[#1]]] &, {}, 1},
Table[Prime[o] + I Prime[o + 1], {o, 1, 201, 2}], 100], ColorFunction -> "Rainbow"]
as seen here (but it is still the same idea)
By the way the author of the video above, Richard Hennigan, also made a Demonstration: Quasicrystals
Just for the logs
ArrayPlot[
CellularAutomaton[{Count[Last[Last[TuringMachine[2361, {1, Mod[#1, 2]}, #2]]], 1] &, {},
1}, {{1}, 0}, 100]]
Similar
ArrayPlot[
CellularAutomaton[{Count[Last[Last[TuringMachine[2361, {1, Mod[#1, 2]}, #2]]], 1] &, {},
1}, RandomInteger[{0, 1}, 100], 20]]
Loosing black
ArrayPlot[
CellularAutomaton[{Count[Last[Last[TuringMachine[401, {1, Mod[#1, 2]}, #2]]], 1] &, {},
1}, RandomInteger[{0, 1}, 100], 100]]
a year of birth
ArrayPlot[
CellularAutomaton[{Count[
Last[Last[
TuringMachine[1959 (* more interesting than 2015 *), {1, Mod[#1, 2]}, #2]]],
1] &, {}, 1}, RandomInteger[{0, 1}, 100], 100]]
the last one for tonight
ArrayPlot[
CellularAutomaton[{Count[Last[Last[TuringMachine[2016, {1, Mod[#1, 2]}, #2]]], 1] &, {},
1}, {{1}, 0}, 100]]
Could possibly also insert a CellularAutomaton into a CellularAutomaton or let a TuringMachine decide which CellularAutomaton to insert … but, will that be cool looking?
Total recall
ArrayPlot[CellularAutomaton[{Count[Last[Last[TuringMachine[2016, {1, Mod[#1, 2]}, Total[#1]]]],
1] &, {}, 1}, {{1}, 0}, 100]]
with a factor
ArrayPlot[
CellularAutomaton[{Count[
Last[Last[TuringMachine[2016, {1, Mod[#1, 2]}, #2 Total[#1]]]],
1] &, {}, 1}, {{1}, 0}, 100]]
The following both are completely different
ArrayPlot[
CellularAutomaton[{Count[Last[Last[TuringMachine[1959, {1, Mod[#1, 2]}, #2 Total[#1]]]],
0] &, {}, 1}, {{1}, 0}, 100]]
ArrayPlot[
CellularAutomaton[{Count[Last[Last[TuringMachine[1959, {1, Mod[#1, 2]}, #2 Total[#1]]]],
1] &, {}, 1}, {{1}, 0}, 100]]
but toggling
ArrayPlot[
CellularAutomaton[{Count[Last[Last[TuringMachine[1959, {1, Mod[#1, 2]}, #2 Total[#1]]]],
Mod[#2, 2]] &, {}, 1}, {{1}, 0}, 100]]
brings not too much.
why do you consider these to be simple programs?
becuase they are short in length - if so, would that make any program that is simply a function call to CelularAutomaton, perhaps surrounded by visual display commands such as ArrayPlot simple?
because the algorithm used in the built-in CellularAutomaton function is hidden (i don’t know if it’s written in WL or in C or uses hash tables or what it is actually DOING when it is evaluated) and one only has to type CellularAutomaton?
stephen wrote in NKS that a complex cellular automaton is not a simple program.
for example, is the forest fire CA a simple program?
it can be written using the CellularAutomaton function (http://forum.wolframscience.com/archive/topic/720-1.html) or it can be written in a way which is very simple to understand (http://www.cs.berkeley.edu/~fateman/papers/cashort.pdf)
btw - one can see in the unpublished Fateman manuscript, the program written in LISP which IMO is simply awful looking and essentially unreadable and when compared to the program written in WL is a very clear example of why WL is a MUCH better language for writing computer simulation programs.
does simplicity refer to readability or to the ease with which one can understand the CA?
e.g. the Game of Life as written using CellularAutomaton is very short but totally opaque (at least to me) while if it is written in another way (e.g. see Wolfram Language Fundamentals -- from Wolfram Library Archive - see the LifeGame program in the last section) it is easy to understand.
this is actually a very important question because as Kovas Boguta has pointed out in his article (i attach it becuase it is not readily available to everyone) “NKS seeks to introduce a basic, empirical science that investigates the behavior of very simple programs.” and as Boguta points out in the original unedited version of this article in the NKS Forum (http://forum.wolframscience.com/showthread.php?s=6e483fc3d86a53032f8cd96e48e7a500&threadid=271&highlight=kovas+boguta) "NKS seeks to introduce a basic, empirical science investigating the behavior of very simple programs. A very important part of the intellectual structure of NKS is how this relates to modeling nature–but although interesting in its own right and important for justifying the entire enterprise, this tie-in with the natural world is absolutely not the subject of the core science. "
note - actually, the insightful comments of Boguta actually indicate that NKS really should have been called NS becuase it is proposing an entirely new field of study - although Richard Feynman would say that it is not a science at all because it does not study nature (https://www.youtube.com/watch?v=lL4wg6ZAFIM).
i apologize for the length of this post and ask for the moderator’s indulgence. i am posting this here becuase while i was planning to discuss this at the 2015 Wolfram Technology Conference in October, my health prevents my doing it there. also, the Wolfram community deserves to understand what NKS is all about becuase it has been horribly distorted and totally misrepresented by so many others (e.g. those who claim that stephen views the universe as a CA which he most definitely does not - he uses a trivalent causal net as a model as explained in NKS) and who don’t even understand the ‘science’ that stephen is actually introducing which is totally original, whether one is interested in it or not. and WL is an integral part of the NKS research program (which stephen siads is one of the reasons he created WL)
Not in this codejam. Everything from that is here in this discussion.
Funny you should mention “quantum” because this year we had several people doing related projects. ne person simulated a D-Wave device and another was researching the type of CA with quantum mechanics described by t’Hooft.
Kovas’s article (in the above post) is a good thing to read.
Most of these CA rules would not qualify as simple. WIth ECA like rule 30 there are 8 bits of information to describe the rule, the states are one of two colors, it is one dimensional and the neighborhoods only have three elements. Most of the above cross the threshold in more than one of these categories. Better to think of this codejam as having fun with CellularAutomaton and Wolfram Language. Just being a CA doesn’t make something simple.
Of course, what is meant by “simple” is elusive and cannot be meaningfully defined in a rigorous way, so it is a matter of opinion. One thing the NKS book does is explain “simple” by showing many examples of it, helping build an intuition.
because a program using CellularAutomaton runs extremely fast, i’d like to follow up on the use of CellularAutomaton for rules that are anonymous functions. i have tried the 1D forest fire CA using a rule involving pattern matching and i get error messages that i can’t even understand. i realze that pattern matching is not especially fast (10 Tips for Writing Fast Mathematica Code—Wolfram Blog) but being able to use pattern-matching based update rules (inclusing those that involve _, __ and ___) within CellularAutomaton would allow us to use it with a great many CA models. what are the restrictions and limitations on using these sorts of rules in CellularAutomaton?
i have tried the 1D forest fire CA using a rule involving pattern
matching and i get error messages that i can’t even understand.
Where is your code?
Here it is:
pyro =
(treeGrowIgnite = #/. {0 :> Floor[1 + p - Random[]], 1 :> Floor[2 + f - Random[]]};
forestIgnite = TreeGrowIgnite //.
{{2, c___, 1} -> {2, c, 2},
{1, c___, 2} -> {2, c, 2},
{a___, 2, 1, b___} -> {a, 2, 2, b},
{a___, 1, 2, b___} -> {a, 2, 2, b}};
forestNew = forestIgnite /. 2 -> 0)&
the first 2 pattern matching replacement rules are apparently not needed becuase they represent wrap around b.c. which are used by default in CellularAutomaton.
note: sorry that this code appears so badly. i write it in one way but in the preview window, what i write is changed into something which is unreadable and sometimes terms are even dropped or changed. i don’t know why.
it bothers me a great deal that stephen uses terms like “simple program” without defining what simple means. its similar to his statement of the Principle of Computational Equivalence which states “Almost all processes that are not obviously simple can be viewed as computations of equivalent sophistication”. i have no idea what it means to say computations have “sophistication”. Wiki defines the word as follows “Sophistication is the quality of refinement displaying good taste, wisdom and subtlety rather than crudeness, stupidity and vulgarity.” (i told my wife that based on this definition, i’m sophisticated and she replied… well, i’m not sure what she replied becuase she was laughing too much for me to understand what she said). many people have said that they don’t understand what PCE means but no one, to my knowledge, has questioned what it means for a computation to be sophisticated? i am quite familiar with theoretical physics models being elegant (which i use to describe a model in contrast to it being a kludge) but not with them being sophisticated. is the use of terms like ‘simple’ and ‘sophisticated’ like the characterization of pornography by Supreme Court Justice Potter Stewart who famously said: I know it when I see it (don’t misunderstand me. i do NOT intend to compare PCE or NKS to pornography - except that both are based on imagery. i think stephen uses NKS rather than NS to emphasize it’s use of visualization rather than equations). I raise these questions becuase i have spent a lot of time (much too much of my time) discussing both WL and NKS with other theoretical physicists and it’s hard to do when i don’t understand the descriptions as given by stephen himself.
Todds answer was so clear and professional, nevertheless you dig in again
it bothers me a great deal that stephen uses terms like “simple
program” without defining what simple means.
Question: Is the following a simple program?
In[17[:= N[I^I, 18]
Out[17]= 0.207879576350761909 + 0.*10^-19 I
with Mathematica, yes. Otherwise you have some trouble relying on Leonhard Eulers clarification what the logarithm is. If I understand Stephen Wolfram a little bit he follows the idea of Richard P Feynman, that quantum electrodynamics is in a way far to complicated (or elaborated (or elegant)) because a photon or electron do for sure not do such calculations during scattering: Feynman proposed to search for another way to understand that unbelievable efficiency, correctness and parallelism that particles show. Feynman was also one of the first to discuss physics and computation. And Mr Wolfram pushed simple programs as a candidate.
If you look into the garden you see effortless growing plants, Erwin Schrödinger asked about cleavage, Albert Einstein detected that there is no such thing as central time, but instead of that something propagates, evolves, steps, does the right thing to keep things running … that step is hoped to be simple, because every entity does it, only we do not see: what and how.
i take umbrage at you first sentence which seems to be a personal attack.. of course todd’s response is professional - did i say otherwise? and his explanation is quite clear. he says “what is meant by “simple” is elusive and cannot be meaningfully defined in a rigorous way, so it is a matter of opinion.”. as for your example, i don’t consider it to be a simple program (or even a program) . but then, that’s my opinion.
Please accept my apologies, my post intended neither to attack posts nor its posters.
Terms like simple programs, which
cannot be meaningfully defined in a rigorous way
invoke discussions and discussion means by chance to disagree in a way.
I tend to muse about simple programs under the aspect of a triple \{ protocol, algorithms, data\}. Data include units and specify the matter, data are dumb algorithms (Charles Petzold), algorithms do the work and a protocol is needed to do I/O.Lets stay in the area of getting intuition: Is it simple to travel from Pisa to Chicago?
If the data is your own body, the algorithm is walking and swimming and the protocol is self-motivation, it is impossible.
If the data is a plane maintained by an airline, the algorithm is flying and the protocol is boarding to that plane, it is simple.
Progress is made by changing the protocols or better inventing new protocols, implementing data and algorithms (in the widest sense) to them, letting people do things they never dreamt off. Mathematica did excatly that in its realm.
In Heisenbergs book “The Part and The Whole” one finds discussions about the symbol as a mental picture to bring facts to understanding and keep things (which are by no means simple) simple.
Now for something completly different. Expressions like
ArrayPlot[CellularAutomaton[{Count[
Last[Last[TuringMachine[2016, {1, Mod[#1, 2]}, #2 Total[#1]]]], 1] &, {}, 1}, {{1}, 0}, 100]]
gave reason to ask why they are considered as simple programs. In a way they are accepted as programs by the question, right?
Why then
N[I^I, 18]
is considered not to be program? It is in the same syntax, follows the same protocol as the above CA program, but invokes other algorithms.















