April Notes
Welcome to an infrequent set of notes about code, biology, and artificial life from arsiliath.
If you are interested in the compute shader workshop, signups are now open for the section starting May 1 (12 of ~25 spots remain). Or just read on…
Existing students: I added a new video on numthreads (section one) and a video on how to use the CCA instancing stacks code (section two). Links in Discord.

The Edge of Chaos
I hope you are doing OK.
This month I will share a breakdown of my implementation of Langton ‘90. I found the paper via Greg Turk, and you can find a PDF here.
Christopher Langton is an early pioneer in Artificial Life and wrote a wealth of neat papers, many ripe for GPU re-implementation.

Today we will look at “Computation at the Edge of Chaos: Phase Transitions and Emergent Computation.” The paper aims to identify cellular automata rulesets that allow for “computation,” which Langton defines as the ability to use and process data.

Imagine an entirely boring cellular automaton (CA) system where nothing happens…
…clearly that system will not be able to process anything.
Now imagine the opposite: an entirely chaotic system where tons of changes happen seemingly randomly, with no structure, as in pure noise…
…clearly that system will also not be able to meaningfully store or process data.
On the other hand, imagine a neither entirely boring nor entirely chaotic system like Game of Life by John Conway🙏. A system like this has structured behavior that can process data and indeed functions as a universal computer (and universal constructor).
The Langton paper describes an approach to CA where, instead of defining rule sets (as in Conway’s game), you create a system that generates rule sets for you.

Crucially, Langton defines a lambda parameter, which determines how boring or chaotic a generated rule set is.
For a more detailed overview, see this summary or the paper itself.

When I came across the paper, I was immediately visually impressed by his breakdown of how the lambda parameter affects the history of 1D CAs…

From there, I wrote a system in Unity that generates CA rules, and then explored it in two and three dimensions. My results render the history of a 2D simulation.
That is, each layer in the y-axis is one frame of a 2D simulation.

It is a very straightforward re-implementation of Langton’s paper, but with 2020 tech. I had days of fun exploring and classifying different visuals.

My approach includes several files…
C# class that manages the compute shaders and generates rules based on the lambda parameter.
Compute shader that creates a colored 2D texture from the 2D simulation based on the rules
Another compute shader that takes the 2D texture and creates a history stack
A custom HDRP instancing shader that renders the stack
Two lights
I encourage you to try this approach, and to implement Artificial Life papers from the 90’s. There is so much to explore.
Hope to see some of you in the May workshop,
Arsiliath

