r/cellular_automata
Just launched: Dev Notes++ — a companion app for indie iOS developers
If you’re an indie dev managing multiple apps, you know the pain of keeping track of everything — bugs, feature requests, screenshots for 10 different locales, marketing posts…
I built Dev Notes++ to keep it all in one place. Some highlights:
✅ Log bugs, features & ideas per app
🔍 Fetch app info directly from the App Store (icon, description, ratings, IAPs)
📸 Organize screenshots by locale
📣 Draft and schedule marketing/social posts
📝 Rich text notes with search
☁️ iCloud sync across all your devices
📤 Export to JSON or Markdown
Free to start (up to 2 apps), with a Pro upgrade for unlimited apps and all features. One-time lifetime option available too.
Would love to hear what features you’d want in a tool like this!
HashLife Engine and Editor
Hey all, the above meta-gif is of Life in Life. I made this in my new CA editor/engine called GOLDE, which offers some convenient and snappy editor features on top of an engine with Golly’s performance. https://github.com/RyanJK5/GOLDE
I also wrote an article about GOLDE's HashLife implementation, including an exchange I had with Tomas Rokicki, the developer of Golly's HashLife engine. If anyone here is interested or has thoughts on the approach, check it out: https://ryanjk5.github.io/posts/GOLDE/
Python notebook with a Paint widget let's you doodle over a game of life to influence it.
If people want to toy around with it, you can play around here.
https://molab.marimo.io/github/koaning/wigglystuff/blob/main/demos/paint-scatter.py/wasm
My life sim was looking so good until the cells fused together into a gestalt consciousness
I'm working on a lifelike Cellular Automaton and found these little creatures and ecosystem. Then they did this.
If you want to learn more about this stuff, I made a video explaining it a bit better here:
https://www.youtube.com/watch?v=q6oUp5KiVFY&lc=Ugzfo-wJD8J6uTAXPeR4AaABAg
Rewrite rules automaton
This idea is solely based on an amazing project MarkovJunior, which is essentially probabilistic pattern matching machine. I though, "ha. This must be the best fit for Wolfram Language!".
Indeed, no tricks were used, except mirroring and rotating the "canvas" to generalize 1D rules into 2D, the rest is purely default pattern matching of the language:
r[{before___, {a___, (RGBColor[1, 0, 0]),(GrayLevel[0]),(GrayLevel[0]), b___}, after___}] :=
{before, {a, (RGBColor[0, 0, 1]),(RGBColor[0, 0, 1]),(RGBColor[1, 0, 0]), b}, after} /; (RandomReal[]<=0.5);
r[{before___, {a___, (RGBColor[1, 0, 0]),n_,(RGBColor[0, 0, 1]), b___}, after___}] :=
{before, {a, (RGBColor[0, 0, 1]),n,(RGBColor[1, 0, 0]), b}, after} /; (RandomReal[]<=0.5);
r[any_] := any
field = Table[(GrayLevel[0]), {30}, {30}];
field[[RandomInteger[{1,30}],RandomInteger[{1,30}]]] = (RGBColor[1, 0, 0]);
Refresh[ArrayPlot[field = applyInAllSymmetries[field]], 0.04]
where
rot[0][m_] := m;
rot[1][m_] := Transpose[Reverse[m]];
rot[2][m_] := Reverse[Reverse /@ m];
rot[3][m_] := Reverse[Transpose[m]];
mirror[m_] := Reverse /@ m; (* left-right mirror *)
symmetries = Join[
Table[rot[k], {k, 0, 3}],
Table[rot[k] @* mirror, {k, 0, 3}]
];
inverseSymmetries = Join[
Table[rot[Mod[-k, 4]], {k, 0, 3}],
Table[mirror @* rot[Mod[-k, 4]], {k, 0, 3}]
];
applyInAllSymmetries[m_] :=
Fold[
#2[[2]][r[#2[[1]][#1]]] &,
m,
Transpose[{symmetries, inverseSymmetries}]
];
Do you like flowers?
A small MarkovJunior-style rewrite engine in vanilla (almost) Wolfram Language https://github.com/JerryI/MarkovJunior
Why WL? It is generally built around pattern matching; therefore, MarkovJunior can be implemented easily using native ReplaceAll, Rule, and Pattern symbols. Most of the code is used for building a friendly API and performing error checks.
For example random filling can be done using:
Black -> Red
For self-avoiding walk:
{a___, Red,Black,Black, b___} :> {a, White,Gray,Red, b}
For this particular example (flowers) it is written as a set of replacing rules, which gradually build soil/sky and then grows some flowers...
AppendTo[rules, {
1, 1, Automatic, {
(* seed the soil region *)
Black -> Yellow
}
}];
AppendTo[rules, {
1, 3, Automatic, {
(* seed several sky regions *)
Black -> Red
}
}];
AppendTo[rules, {
1, Infinity, Automatic, {
(* grow the sky and soil regions from their seeds *)
{a___, Red,Black, b___} :> {a, Red,Red, b},
{a___, Yellow,Black, b___} :> {a, Yellow,Yellow, b}
}
}];
AppendTo[rules, {
All, Infinity, Automatic, {
(* convert temporary region colors into sky and soil *)
{a___, Red, b___} :> {a, LightBlue, b},
{a___, Yellow, b___} :> {a, Brown, b}
}
}];
AppendTo[rules, {
1, Infinity, All, {
(* plant the first stem segment along the soil line *)
{
bf___,
{a1___, LightBlue,LightBlue,LightBlue, b1___},
{a2___, LightBlue,LightBlue,LightBlue, b2___},
{a3___, Brown,Brown,Brown, b3___},
af___
} :> {
bf,
{a1 , LightBlue,LightBlue,LightBlue, b1 },
{a2 , LightBlue,Green,LightBlue, b2 },
{a3 , Brown,Brown,Brown, b3 },
af
} /; Length[{a1}]==Length[{a2}]==Length[{a3}]
}
}];
AppendTo[rules, {
1, Infinity, "MirrorX", {
(* grow stems and leaves with mirrored variants *)
(* weight it with some probabillity as well *)
{
bf___,
{a1___, LightBlue,LightBlue,LightBlue, b1___},
{a2___, LightBlue,LightBlue,Green, b2___},
{a3___, LightBlue,LightBlue,LightBlue, b3___},
af___
} :> {
bf,
{a1 , LightBlue,LightBlue,LightBlue, b1 },
{a2 , LightBlue,Green,Green, b2 },
{a3 , LightBlue,LightBlue,LightBlue, b3 },
af
} /; Length[{a1}]==Length[{a2}]==Length[{a3}],
{
bf___,
{a1___, LightBlue,LightBlue,LightBlue, b1___},
{a2___, LightBlue,LightBlue,LightBlue, b2___},
{a3___, LightBlue,Green,Green, b3___},
af___
} :> {
bf,
{a1 , LightBlue,LightBlue,LightBlue, b1 },
{a2 , LightBlue,Green,LightBlue, b2 },
{a3 , LightBlue,Green,Green, b3 },
af
} /; Length[{a1}]==Length[{a2}]==Length[{a3}],
{
bf___,
{a0___, LightBlue,LightBlue,LightBlue, b0___},
{a1___, LightBlue,LightBlue,LightBlue, b1___},
{a2___, LightBlue,LightBlue,LightBlue, b2___},
{a3___, LightBlue,Green,LightBlue, b3___},
af___
} :> {
bf,
{a0 , LightBlue,LightBlue,LightBlue, b0 },
{a1 , LightBlue,LightBlue,LightBlue, b1 },
{a2 , LightBlue,Green,LightBlue, b2 },
{a3 , LightBlue,Green,LightBlue, b3 },
af
} /; Length[{a1}]==Length[{a2}]==Length[{a3}]==Length[{a0}],
{
bf___,
{a0___, LightBlue,LightBlue,LightBlue,LightBlue, b0___},
{a1___, LightBlue,Green,LightBlue,LightBlue, b1___},
{a2___, LightBlue,Green,LightBlue,LightBlue, b2___},
{a3___, LightBlue,Green,LightBlue,LightBlue, b3___},
af___
} :> {
bf,
{a0 , LightBlue,LightBlue,LightBlue,LightBlue, b0 },
{a1 , LightBlue,LightBlue,LightBlue,LightBlue, b1 },
{a2 , LightBlue,Green,Green,LightBlue, b2 },
{a3 , LightBlue,Green,LightBlue,LightBlue, b3 },
af
} /; RandomReal[]<0.5 && Length[{a0}]==Length[{a1}]==Length[{a2}]==Length[{a3}],
{
bf___,
{a1___, LightBlue,LightBlue,LightBlue, b1___},
{a2___, LightBlue,LightBlue,LightBlue, b2___},
{a3___, LightBlue,Green,LightBlue, b3___},
af___
} :> {
bf,
{a1 , LightBlue,LightBlue,LightBlue, b1 },
{a2 , LightBlue,Red,LightBlue, b2 },
{a3 , LightBlue,Green,LightBlue, b3 },
af
} /; RandomReal[]<0.2 && Length[{a1}]==Length[{a2}]==Length[{a3}]
}
}];
AppendTo[rules, {
All, Infinity, All, {
(* turn mature stems into blossoms *)
{
bf___,
{a0___, LightBlue,LightBlue,LightBlue, b0___},
{a1___, LightBlue,Red,LightBlue, b1___},
{a2___, LightBlue,Green,LightBlue, b2___},
{a3___, LightBlue,Green,LightBlue, b3___},
af___
} :> {
bf,
{a0 , LightBlue,Red,LightBlue, b0 },
{a1 , Red,Yellow,Red, b1 },
{a2 , LightBlue,Red,LightBlue, b2 },
{a3 , LightBlue,Green,LightBlue, b3 },
af
} /; Length[{a0}]==Length[{a1}]==Length[{a2}]==Length[{a3}]
}
}];
Two curated Conway Glyphs engaged in an intricate dance according to the "Adversarial Conway" algorithm.
All music royalty-free from www.epidemicsound.com
Leah Ryder - Caracal
Generative metasurface function using cellular automata.
Top inset is a section of the input matrix schematic. Red outline shows portion depicted in main image. 16k by 16k image size. Full size of image is about 900,000 pixels on the axis.
Has this been discovered before?
https://reddit.com/link/1tffi2b/video/toreqvhqnm1h1/player
I'm not new in the game of life, but I remember finding something in it a long while ago. I just want to ask if anyone knew about that one thing
Spiral Knight Tilings
I would like to share a few images of spiral knight tilings inspired by this video from Numberfile. Most were sampled from this page. Hope you find these fun!
Setup: we number the squares of the infinite chessboard in a spiral order, starting at the origin and walking outward counterclockwise. We place chess knights one at a time, cycling through n colors. Each new knight goes in the earliest spiral cell that is still empty and satisfies a constraint determined by a directed graph on the n colors:
arc u -> v means "a u-knight at a knight-move from cell c forbids placing color v at c."
Other examples and a small illustration of how these are constructed can be found in my earlier post.
Experiments with a Five-Letter Alphabet
Classical cellular automata are binary; here, I explore initial experiments with an alphabet size of five.
Updated my mold simulation
Cute Mold is a mold growth and evolution simulation. Now the world is bigger, the molds are more complex, and there are light sources with cool names!
Each mold gets energy from the empty space it surrounds, taking into account the light strength. This means the mold that surrounds more empty space gets more energy. Molds can't interact with or damage each other. Instead, they evolve simply by competing for space.
Molds with the same genome have the same color, but different shades. A mold with a mutated genome gets a new color. Cells can create spores that appear as black dots. Once a spore matures, it turns white, and a new mold is born from it.
Generative functions using cellular automata.
Input schematic top left inset. Main image output function showing small portion of central input.
Used the wrong account to post this originally whoops, but here's a random challenge I made
You are in a infinite grid, your goal is to get from your starting point to 100 tiles over, at the start you may place as many toggled tiles as you want, but once you start, you cant place more, also, every time you move, assuming that in this scenario that you can only move right, and at only one square per move, the rules of Conway's game of life are applied, but if you land on an off square you die, what is your plan?
I built a simulator to study emergent pattern formation. One of my proudest projects.
It’s a computational framework for visualizing emergent structure in complex adaptive systems through operator-driven field evolution. It’s mostly a research instrument, but it’s also pretty fun to just mess around with. All in browser. The desktop is a full IDE and provides a lot more functional control, the mobile version is more a toy but still fun.
Some experiments with stochastic rules
Use of Rule 114 in CellCosmos.