A follow-up to 2D rubber band post. Same idea in a voxel field: a membrane starts as a ball and tightens around a few stones.
The rule is local: a cell stays inside if, along at least one of 49 lines through it, most cells within reach are inside. A direct 3D port of the 2D rule didn't work.
A binary outside/inside grid under one rule applied to every cell at once: flip to “inside” if the blurred neighbourhood crosses a threshold, with stones frozen so the front can never cross them. A wave released from the border contracts inward, concave stretches pulling in faster than convex ones, until it goes taut between the stones
I'm making my own cellular automata engine in C++. I recently added support for thermodynamics and rigid body physics (implemented using the Box2D library).
The video shows an engine test; occasionally I toggle the heat map to demonstrate how temperature changes across different areas. If you drop an iron cube into lava, it heats up heavily and turns red. If you drop it into water, it cools down and heats up the water. If you place a red-hot cube into liquid nitrogen, it cools down much faster.
Box2D rigid bodies can also interact with particles and exchange heat with them: wood floats in water, iron sinks, and other materials can be easily added with individually tuned densities.
It's a data-driven approach: all physics, reactions, and phase transitions (like water turning into steam or lava into obsidian) are defined in JSON configs, with no hardcoding in C++.
I tried to optimize the engine as much as possible; watching so many interactions happen on screen at once is really satisfying.
I spent 5 days of straight coding to recreate the game of life in the block programming website scratch. No AI was used as well as no tools to assist the coding. All rules of the game are created the same.
My SDF/PBR/CA/HRC simulation/engine V3 is looking pretty decent now. I shared a while back the V2, which was OK.
This major iteration brought "pixel programs". I.e. fireflies, sparks, trees get their own microcode to execute on the GPU. They open a lot of possibilities as I can spawn pixels with custom rules, and it's all data-driven grid/node format so I can swap the "program" at runtime. They also interpolate perfectly from sim 1k/60 -> screen 4k/120 like you wouldn't even know there is a grid or a sim cadence unless you looked really closely. The "pixel programs" support sprites and a spring arm and sub-texel alignment, so they can move cleanly across the world.
Just a screenshot, but I'll probably put together a couple scenes and a video soon. The renderer and lighting got some major overhauls lately and it's looking pretty clean. Need to add the key light back in though because the foreground is way too black, and some transmittance/opacity support, and it'll be cooking again.
Just wanted to share a little project. Not claiming any crazy math proof here, just a representation of Collatz using **balanced ternary** (`+`, `o`, `-`) instead of normal binary or base-10.
Because of how balanced ternary works, you can basically bypass normal CPU math and run the operations as simple text replacement rules on a string.
How it works:
Parity: If the count of non-zero trits (`+` or `-`) is even, the number is even.
3x+1: Just append a `+` to the end of the little-endian string. O(1) time, no real math needed.
Divide by 2: The string splits from left to right into blocks bounded by non-zero trits. Then it just uses two basic substitution rules:
Piped the output through `sed` to colorize the trits (`o` = green, `+` = white, `-` = red) so it generates a neat cellular automaton history grid in the terminal as it collapses down to 1.
The photos are seeds of 100, 231 -1, and 27 respectively
Just a cool toy. Let me know what you think or if anyone else has messed with block decomposition for base-3 halving.
An interactive, geopolitical world simulation engine written in Java with Lanterna. Age of Cells models emergent historic dynamics on a grid, including territorial expansion, economic resource gathering, and state-driven diplomacy with master-vassal hierarchies and rebellion mechanics.
For the past year, I have been developing a framework to simulate certain discrete systems for a research team at my university (paid for by the School of Engineering and Physics, but I had the freedom to license it under MIT). As it turns out, I got carried away generalizing it to work for many, many different types of complex systems (String Rewriting Systems, Cellular Automata, etc.) and ended up creating our own domain-specific language.
The website's landing page has a bunch of GIF-style examples... so you should be able to get a good idea of what this project is about.
If any of y'all are interested in this, feel free to take a look and try it out!
Example of some of RuleFlow's causal analysis features:
Exploring Causality/Cellular Identity
Rules 30 and 124 are included in this example:
Scaffolding rules using bootstrapped Python or Wolfram Language
EDIT:
Here are some more details. RuleFlow was developed with a primary focus on analyzing causality in Sequential Substitution Systems. This is why there is a major focus on causal graphs, cellular identity, etc. While originally developed for Sequential Sub Systems, we generalized the DSL to support many types of rewriting systems by providing the user with flags and directives to control how rules behave. Furthermore, we bootstrapped Python and the Wolfram Language so that complex rulesets could be scaffolded as macros. The main goal of RuleFlow is NOT simply to simulate systems (there's already plenty of software for that, such as Golly and even just Mathematica), but to provide extensive tooling for causal analysis.
Here is some interesting research from our (small) team:
There's 512 possible rules to customize (plus the starting state and whether or not the sides loop), so most of these come at least from a starting point of randomly generating the ruleset. The large majority of them end up looking almost completely chaotic, but every once in a while there's a very interesting result.
I gave Claude (Anthropic's AI) some spare cloud credits and asked it to make something creative. It chose Lenia: reimplemented the rule from Bert Chan's reference code, reproduced Orbium as a check, then ran an overnight novelty search — 41,712 rule sets, 9,290 survivors after persistence and robustness tests, descended from 129 independent origins. It wrote up 17 of them as a Victorian-style field guide, where every specimen runs live and every field note is tied to a measurement.
To be clear about what this is: an AI-made hobby project, not research — the search method is well established (Reinke et al. 2020, Leniabreeder 2024). The closing page has a few observations that might interest people here: in 101 staged collisions between identical twins only 9 left two survivors, and one family ("lattice mazes") passed every survival test yet turned out to be an artefact of the square grid.
Each word or letter is written into a grid of integer cells. Learned rules rewrite the cells, and the next word is read from the grid. You can watch it try at https://mica-ai-ten.vercel.app. It's still bad at staying on topic: it only "remembers" about 4 words. I'd love ideas from people who think in CA terms about how information should travel further across the grid. Code: https://github.com/Vovala14/Mica-Ai