<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Cellular Automata on Programmer.ie: Modern AI programming</title>
    <link>http://programmer.ie/tags/cellular-automata/</link>
    <description>Recent content in Cellular Automata on Programmer.ie: Modern AI programming</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 11 Aug 2026 01:34:00 +0100</lastBuildDate>
    <atom:link href="http://programmer.ie/tags/cellular-automata/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Digital Life 05: Kill It</title>
      <link>http://programmer.ie/books/digital-life/05-kill-it/</link>
      <pubDate>Tue, 11 Aug 2026 01:34:00 +0100</pubDate>
      <guid>http://programmer.ie/books/digital-life/05-kill-it/</guid>
      <description>&lt;h1 id=&#34;digital-life-05-kill-it&#34;&gt;Digital Life 05: Kill It&lt;/h1&gt;&#xA;&lt;p&gt;We have been too kind to our systems.&lt;/p&gt;&#xA;&lt;p&gt;So far we have:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;initialized them carefully,&lt;/li&gt;&#xA;&lt;li&gt;given them clean environments,&lt;/li&gt;&#xA;&lt;li&gt;watched them evolve,&lt;/li&gt;&#xA;&lt;li&gt;selected examples that behave interestingly,&lt;/li&gt;&#xA;&lt;li&gt;and mostly left them alone.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;That is a dangerous way to study anything that looks life-like.&lt;/p&gt;&#xA;&lt;p&gt;A structure that persists when nothing interferes with it may be interesting.&lt;/p&gt;&#xA;&lt;p&gt;But biological systems do something harder.&lt;/p&gt;&#xA;&lt;p&gt;They persist in a world that keeps interfering with them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Digital Life 04: When Does a Pattern Become a Thing?</title>
      <link>http://programmer.ie/books/digital-life/04-when-does-a-pattern-become-a-thing/</link>
      <pubDate>Tue, 11 Aug 2026 01:26:00 +0100</pubDate>
      <guid>http://programmer.ie/books/digital-life/04-when-does-a-pattern-become-a-thing/</guid>
      <description>&lt;h1 id=&#34;digital-life-04-when-does-a-pattern-become-a-thing&#34;&gt;Digital Life 04: When Does a Pattern Become a Thing?&lt;/h1&gt;&#xA;&lt;p&gt;Rule 30 gave us structure.&lt;/p&gt;&#xA;&lt;p&gt;But it did not obviously give us a &lt;strong&gt;thing&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The pattern expanded.&lt;/p&gt;&#xA;&lt;p&gt;It changed.&lt;/p&gt;&#xA;&lt;p&gt;Differences propagated.&lt;/p&gt;&#xA;&lt;p&gt;Interesting global behavior appeared.&lt;/p&gt;&#xA;&lt;p&gt;But if I pointed at one region and asked:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Is that the same object ten generations later?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;the answer was not obvious.&lt;/p&gt;&#xA;&lt;p&gt;So let&amp;rsquo;s change systems.&lt;/p&gt;&#xA;&lt;p&gt;Not because Conway&amp;rsquo;s Game of Life is more sophisticated.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Digital Life 03: The First Surprise</title>
      <link>http://programmer.ie/books/digital-life/03-the-first-surprise/</link>
      <pubDate>Tue, 11 Aug 2026 01:19:00 +0100</pubDate>
      <guid>http://programmer.ie/books/digital-life/03-the-first-surprise/</guid>
      <description>&lt;p&gt;We ended the last chapter by changing one number.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rule &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;22&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;became:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rule &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;30&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Nothing else changed.&lt;/p&gt;&#xA;&lt;p&gt;Same world.&lt;/p&gt;&#xA;&lt;p&gt;Same single active cell.&lt;/p&gt;&#xA;&lt;p&gt;Same three-cell neighborhood.&lt;/p&gt;&#xA;&lt;p&gt;Same synchronous update.&lt;/p&gt;&#xA;&lt;p&gt;Same periodic boundary.&lt;/p&gt;&#xA;&lt;p&gt;Same eight-bit lookup mechanism.&lt;/p&gt;&#xA;&lt;p&gt;Only the rule changed.&lt;/p&gt;&#xA;&lt;p&gt;And the spacetime diagram stopped looking simple.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;http://programmer.ie/images/books/digital-life/ch03-rule30-hero.png&#34; alt=&#34;Rule 30 from a single active cell&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There is visible structure on the left.&lt;/p&gt;&#xA;&lt;p&gt;There is irregularity on the right.&lt;/p&gt;&#xA;&lt;p&gt;There are repeating fragments.&lt;/p&gt;&#xA;&lt;p&gt;There are regions that look almost patterned and then break apart.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Digital Life 02: Remove Almost Everything</title>
      <link>http://programmer.ie/books/digital-life/02-remove-almost-everything/</link>
      <pubDate>Tue, 11 Aug 2026 01:08:00 +0100</pubDate>
      <guid>http://programmer.ie/books/digital-life/02-remove-almost-everything/</guid>
      <description>&lt;p&gt;In the previous chapter we started with something complicated.&lt;/p&gt;&#xA;&lt;p&gt;A continuous field.&lt;/p&gt;&#xA;&lt;p&gt;A smooth neighborhood.&lt;/p&gt;&#xA;&lt;p&gt;A growth process.&lt;/p&gt;&#xA;&lt;p&gt;Localized structures that moved through space.&lt;/p&gt;&#xA;&lt;p&gt;Patterns that looked disturbingly creature-like.&lt;/p&gt;&#xA;&lt;p&gt;That was useful because it gave us a mystery.&lt;/p&gt;&#xA;&lt;p&gt;Now we are going to destroy almost all of it.&lt;/p&gt;&#xA;&lt;p&gt;Not gradually.&lt;/p&gt;&#xA;&lt;p&gt;Aggressively.&lt;/p&gt;&#xA;&lt;p&gt;We want to know:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;How little machinery can remain before interesting organization disappears?&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Start with the kind of system we saw in Lenia.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Digital Life 01: Look at This Thing</title>
      <link>http://programmer.ie/books/digital-life/01-look-at-this-thing/</link>
      <pubDate>Tue, 11 Aug 2026 01:06:00 +0100</pubDate>
      <guid>http://programmer.ie/books/digital-life/01-look-at-this-thing/</guid>
      <description>&lt;h1 id=&#34;digital-life-01-look-at-this-thing&#34;&gt;Digital Life 01: Look at This Thing&lt;/h1&gt;&#xA;&lt;p&gt;Don&amp;rsquo;t read anything yet.&lt;/p&gt;&#xA;&lt;p&gt;Watch this.&lt;/p&gt;&#xA;&lt;!--&#xA;TODO VISUAL:&#xA;Full-width animated Lenia or Flow-Lenia organism.&#xA;&#xA;Prefer:&#xA;- localized organism&#xA;- visible locomotion or deformation&#xA;- no explanatory labels&#xA;- dark/neutral background&#xA;- several seconds of uninterrupted motion&#xA;&#xA;Caption should initially be minimal:&#xA;&#34;One state of a continuous cellular automaton evolving through time.&#34;&#xA;--&gt;&#xA;&lt;p&gt;Something is moving.&lt;/p&gt;&#xA;&lt;p&gt;It appears to have a boundary.&lt;/p&gt;&#xA;&lt;p&gt;Different parts of it seem to behave differently.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Digital Life 00: What Would Digital Life Mean?</title>
      <link>http://programmer.ie/books/digital-life/00-what-is-digital-life/</link>
      <pubDate>Tue, 11 Aug 2026 00:31:00 +0100</pubDate>
      <guid>http://programmer.ie/books/digital-life/00-what-is-digital-life/</guid>
      <description>&lt;h1 id=&#34;digital-life-00-what-would-digital-life-mean&#34;&gt;Digital Life 00: What Would Digital Life Mean?&lt;/h1&gt;&#xA;&lt;p&gt;Suppose we wanted to build life in software.&lt;/p&gt;&#xA;&lt;p&gt;Not simulate a bird.&lt;/p&gt;&#xA;&lt;p&gt;Not animate a creature.&lt;/p&gt;&#xA;&lt;p&gt;Not create an AI assistant and give it a name.&lt;/p&gt;&#xA;&lt;p&gt;Something more fundamental.&lt;/p&gt;&#xA;&lt;p&gt;A computational system that begins to exhibit properties we associate with living things:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;structure&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;persistence&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;response&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;adaptation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;repair&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;memory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;inheritance&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;evolution&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The obvious temptation is to start implementing those words.&lt;/p&gt;&#xA;&lt;p&gt;We could create:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 58: Capstone — Discover, Measure and Explain a New System</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-58/</link>
      <pubDate>Mon, 10 Aug 2026 21:01:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-58/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-58-capstone--discover-measure-and-explain-a-new-system&#34;&gt;Cellular Automata From First Principles 58: Capstone — Discover, Measure and Explain a New System&lt;/h1&gt;&#xA;&lt;p&gt;The book began with one tiny rule applied to one tiny neighborhood.&lt;/p&gt;&#xA;&lt;p&gt;We end with a different question:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Can we discover a cellular system, characterize its behavior, test its robustness and explain what we actually know about it?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;That is the capstone.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;choose-a-system-family&#34;&gt;Choose a system family&lt;/h2&gt;&#xA;&lt;p&gt;The capstone can use any family we built:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 57: Build a Cellular Automata Laboratory</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-57/</link>
      <pubDate>Mon, 10 Aug 2026 21:00:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-57/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-57-build-a-cellular-automata-laboratory&#34;&gt;Cellular Automata From First Principles 57: Build a Cellular Automata Laboratory&lt;/h1&gt;&#xA;&lt;p&gt;We now have enough pieces to stop thinking in terms of isolated scripts.&lt;/p&gt;&#xA;&lt;p&gt;A useful cellular-automata laboratory should let us define, run, measure, replay and visualize experiments across many kinds of automata without hiding the mechanisms we spent the whole book learning.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;the-laboratory-is-not-the-model&#34;&gt;The laboratory is not the model&lt;/h2&gt;&#xA;&lt;p&gt;Keep these concerns separate:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;model definition&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;execution backend&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;experiment configuration&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;metrics&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;artifacts&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;analysis&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A rule should not know where its PNG is saved.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 56: Generate Figures and Animations</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-56/</link>
      <pubDate>Mon, 10 Aug 2026 20:59:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-56/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-56-generate-figures-and-animations&#34;&gt;Cellular Automata From First Principles 56: Generate Figures and Animations&lt;/h1&gt;&#xA;&lt;p&gt;Cellular automata are visual systems.&lt;/p&gt;&#xA;&lt;p&gt;That makes figures and animations unusually important.&lt;/p&gt;&#xA;&lt;p&gt;But a useful image is not merely a screenshot. It should be a reproducible output of an experiment.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;save-figures-from-data-not-from-memory&#34;&gt;Save figures from data, not from memory&lt;/h2&gt;&#xA;&lt;p&gt;Suppose an experiment has produced a spacetime history:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;history &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;stack(states)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A figure generator should accept that result explicitly:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; matplotlib.pyplot &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; plt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;save_spacetime&lt;/span&gt;(history, path):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    fig, ax &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;subplots(figsize&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ax&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;imshow(history, interpolation&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;nearest&amp;#34;&lt;/span&gt;, aspect&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;auto&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ax&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set_xlabel(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;cell&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ax&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set_ylabel(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    fig&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;tight_layout()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    fig&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;savefig(path, dpi&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;180&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    plt&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;close(fig)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now the PNG is derived from recorded state rather than from an interactive session we cannot reproduce.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 55: Run Parameter Sweeps and Benchmarks</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-55/</link>
      <pubDate>Mon, 10 Aug 2026 20:58:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-55/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-55-run-parameter-sweeps-and-benchmarks&#34;&gt;Cellular Automata From First Principles 55: Run Parameter Sweeps and Benchmarks&lt;/h1&gt;&#xA;&lt;p&gt;Once experiments are reproducible, we can stop treating parameters as one-off choices and start mapping behavior systematically.&lt;/p&gt;&#xA;&lt;p&gt;A parameter sweep is not merely a convenience.&lt;/p&gt;&#xA;&lt;p&gt;It is a way to turn a model into a measurable landscape.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;build-a-grid-of-experiments&#34;&gt;Build a grid of experiments&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; itertools &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; product&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mus &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;0.12&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.14&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.16&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sigmas &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;0.01&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.02&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.03&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;configs &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;mu&amp;#34;&lt;/span&gt;: mu, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sigma&amp;#34;&lt;/span&gt;: sigma, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;seed&amp;#34;&lt;/span&gt;: seed}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; mu, sigma, seed &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; product(mus, sigmas, range(&lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Notice the seed axis.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 54: Make Experiments Reproducible</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-54/</link>
      <pubDate>Mon, 10 Aug 2026 20:57:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-54/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-54-make-experiments-reproducible&#34;&gt;Cellular Automata From First Principles 54: Make Experiments Reproducible&lt;/h1&gt;&#xA;&lt;p&gt;By this stage the book contains many systems whose behavior depends on parameters, seeds and implementation choices.&lt;/p&gt;&#xA;&lt;p&gt;If we cannot reconstruct a run, we cannot really compare it.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;treat-configuration-as-data&#34;&gt;Treat configuration as data&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; dataclasses &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; dataclass, asdict&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@dataclass&lt;/span&gt;(frozen&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ExperimentConfig&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    model: str&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    width: int&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    height: int&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    steps: int&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    seed: int&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    backend: str&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    dtype: str&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then extend with model-specific parameters rather than hiding them in notebook cells.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 53: Build a Reusable Cellular Automata Engine</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-53/</link>
      <pubDate>Mon, 10 Aug 2026 20:56:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-53/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-53-build-a-reusable-cellular-automata-engine&#34;&gt;Cellular Automata From First Principles 53: Build a Reusable Cellular Automata Engine&lt;/h1&gt;&#xA;&lt;p&gt;Across this book we repeatedly rebuilt the same pieces:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;neighborhood&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rule&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;step loop&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;measurements&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rendering&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That repetition was useful while learning.&lt;/p&gt;&#xA;&lt;p&gt;Now it is time to turn those concepts into interfaces.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;keep-the-engine-small&#34;&gt;Keep the engine small&lt;/h2&gt;&#xA;&lt;p&gt;A useful engine does not need to know what Conway&amp;rsquo;s Life, Lenia or an NCA is.&lt;/p&gt;&#xA;&lt;p&gt;It only needs to orchestrate state transitions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 52: Use FFTs for Large Neighborhoods</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-52/</link>
      <pubDate>Mon, 10 Aug 2026 20:55:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-52/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-52-use-ffts-for-large-neighborhoods&#34;&gt;Cellular Automata From First Principles 52: Use FFTs for Large Neighborhoods&lt;/h1&gt;&#xA;&lt;p&gt;Small local neighborhoods are cheap to evaluate directly.&lt;/p&gt;&#xA;&lt;p&gt;Large smooth kernels are different.&lt;/p&gt;&#xA;&lt;p&gt;Lenia taught us that a neighborhood may cover dozens of cells in every direction. At that scale, direct convolution can become expensive.&lt;/p&gt;&#xA;&lt;p&gt;The Fourier transform gives us another route.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;convolution-becomes-multiplication&#34;&gt;Convolution becomes multiplication&lt;/h2&gt;&#xA;&lt;p&gt;For periodic domains:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;convolution in space&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ↕&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;multiplication in frequency&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So instead of sliding a large kernel over every location, we can transform both arrays, multiply them, and transform back.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 51: Run Cellular Automata on the GPU</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-51/</link>
      <pubDate>Mon, 10 Aug 2026 20:54:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-51/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-51-run-cellular-automata-on-the-gpu&#34;&gt;Cellular Automata From First Principles 51: Run Cellular Automata on the GPU&lt;/h1&gt;&#xA;&lt;p&gt;Once the update is expressed as tensor operations, moving to a GPU becomes straightforward.&lt;/p&gt;&#xA;&lt;p&gt;But a GPU is not automatically faster.&lt;/p&gt;&#xA;&lt;p&gt;It wins when there is enough parallel work to amortize transfer and launch overhead.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;a-tensor-implementation-of-life&#34;&gt;A tensor implementation of Life&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; torch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; torch.nn.functional &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; F&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;LIFE_KERNEL &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; torch&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;tensor(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    [[&lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;],&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     [&lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;],&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     [&lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;]]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;view(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;life_step&lt;/span&gt;(x):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    kernel &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; LIFE_KERNEL&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;to(x&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;device)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    neighbors &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; F&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;conv2d(x, kernel, padding&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    alive &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; x &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.5&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    born &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; neighbors &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    survive &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; alive &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt; (neighbors &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; (born &lt;span style=&#34;color:#f92672&#34;&gt;|&lt;/span&gt; survive)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;float()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Represent a batch as:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 50: Vectorize the Update Loop</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-50/</link>
      <pubDate>Mon, 10 Aug 2026 20:53:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-50/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-50-vectorize-the-update-loop&#34;&gt;Cellular Automata From First Principles 50: Vectorize the Update Loop&lt;/h1&gt;&#xA;&lt;p&gt;A cellular automaton is local.&lt;/p&gt;&#xA;&lt;p&gt;That does &lt;strong&gt;not&lt;/strong&gt; mean we should update it cell by cell in Python.&lt;/p&gt;&#xA;&lt;p&gt;For dense grids, the same local rule is applied everywhere. That regularity is exactly what array programming is good at.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;start-with-the-obvious-implementation&#34;&gt;Start with the obvious implementation&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;life_step_slow&lt;/span&gt;(grid):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    height, width &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; grid&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;shape&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    next_grid &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;zeros_like(grid)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; y &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; range(height):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; x &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; range(width):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            total &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; dy &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; (&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; dx &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; (&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; dx &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;and&lt;/span&gt; dy &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                        &lt;span style=&#34;color:#66d9ef&#34;&gt;continue&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    total &lt;span style=&#34;color:#f92672&#34;&gt;+=&lt;/span&gt; grid[(y &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; dy) &lt;span style=&#34;color:#f92672&#34;&gt;%&lt;/span&gt; height, (x &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; dx) &lt;span style=&#34;color:#f92672&#34;&gt;%&lt;/span&gt; width]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            alive &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; grid[y, x] &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            next_grid[y, x] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; (&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                total &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;or&lt;/span&gt; (alive &lt;span style=&#34;color:#f92672&#34;&gt;and&lt;/span&gt; total &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; next_grid&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is useful because it states the mechanism clearly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 49: Profile Before You Optimize</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-49/</link>
      <pubDate>Mon, 10 Aug 2026 20:52:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-49/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-49-profile-before-you-optimize&#34;&gt;Cellular Automata From First Principles 49: Profile Before You Optimize&lt;/h1&gt;&#xA;&lt;p&gt;By now we have built dozens of automata.&lt;/p&gt;&#xA;&lt;p&gt;The natural temptation is to make them faster.&lt;/p&gt;&#xA;&lt;p&gt;The wrong first question is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Which optimization trick should I use?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;The right first question is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Where is the time actually going?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Performance work begins with measurement.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;define-the-workload-first&#34;&gt;Define the workload first&lt;/h2&gt;&#xA;&lt;p&gt;A benchmark is only meaningful if the workload is explicit.&lt;/p&gt;&#xA;&lt;p&gt;For a cellular automaton, record at least:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 48: What Did the Neural CA Actually Learn?</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-48/</link>
      <pubDate>Mon, 10 Aug 2026 20:41:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-48/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-48-what-did-the-neural-ca-actually-learn&#34;&gt;Cellular Automata From First Principles 48: What Did the Neural CA Actually Learn?&lt;/h1&gt;&#xA;&lt;p&gt;Visualization gives us hypotheses.&lt;/p&gt;&#xA;&lt;p&gt;Intervention gives us evidence.&lt;/p&gt;&#xA;&lt;p&gt;If we suspect a hidden channel carries useful information, the next question is simple:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;what happens if we remove it?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This chapter turns NCA interpretability into controlled experimentation.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;establish-the-behavioral-baseline&#34;&gt;Establish the behavioral baseline&lt;/h2&gt;&#xA;&lt;p&gt;Before touching the model, record its normal performance.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;baseline &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; evaluate_suite(model, test_mazes)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Keep metrics such as:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;valid-path rate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;optimal-path rate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mean excess path length&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;unreachable-maze accuracy&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stabilization time&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Every intervention will be compared with this baseline.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 47: Inspect Hidden-State Propagation</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-47/</link>
      <pubDate>Mon, 10 Aug 2026 20:40:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-47/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-47-inspect-hidden-state-propagation&#34;&gt;Cellular Automata From First Principles 47: Inspect Hidden-State Propagation&lt;/h1&gt;&#xA;&lt;p&gt;A neural cellular automaton can solve a maze while most of its computation remains invisible.&lt;/p&gt;&#xA;&lt;p&gt;The visible output might be one distance channel.&lt;/p&gt;&#xA;&lt;p&gt;The internal state may contain twelve more channels evolving underneath it.&lt;/p&gt;&#xA;&lt;p&gt;This chapter asks:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;what is moving through those hidden channels while the answer is being computed?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;capture-the-entire-state-trajectory&#34;&gt;Capture the entire state trajectory&lt;/h2&gt;&#xA;&lt;p&gt;Instead of saving only the final output:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 43: Test Generalization Beyond Training</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-43/</link>
      <pubDate>Mon, 10 Aug 2026 20:39:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-43/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-43-test-generalization-beyond-training&#34;&gt;Cellular Automata From First Principles 43: Test Generalization Beyond Training&lt;/h1&gt;&#xA;&lt;p&gt;A model can look robust while still depending on the exact conditions used during training.&lt;/p&gt;&#xA;&lt;p&gt;So after growth, persistence and regeneration, we need a harder question:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;what happens when the world changes?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;build-a-generalization-matrix&#34;&gt;Build a generalization matrix&lt;/h2&gt;&#xA;&lt;p&gt;Vary dimensions independently:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;canvas size&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;seed position&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;update rate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rollout length&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;damage geometry&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;damage severity&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;noise level&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;boundary conditions&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then evaluate combinations that were not used during training.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 46: Generalize to Harder and Larger Mazes</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-46/</link>
      <pubDate>Mon, 10 Aug 2026 20:39:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-46/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-46-generalize-to-harder-and-larger-mazes&#34;&gt;Cellular Automata From First Principles 46: Generalize to Harder and Larger Mazes&lt;/h1&gt;&#xA;&lt;p&gt;Training accuracy answers the easiest question:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Can the model solve problems drawn from the training distribution?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The more interesting question is:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Did the local rule learn a reusable computation?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This chapter turns that into an explicit evaluation protocol.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;hold-out-dimensions-of-difficulty&#34;&gt;Hold out dimensions of difficulty&lt;/h2&gt;&#xA;&lt;p&gt;Instead of one validation set, create several test families.&lt;/p&gt;&#xA;&lt;p&gt;For example:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A: 32×32, familiar wall density&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;B: 48×48, familiar wall density&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;C: 64×64, familiar wall density&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;D: 32×32, denser obstacles&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;E: 32×32, longer required paths&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;F: different procedural maze generator&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;G: narrow bottlenecks and many dead ends&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The point is not to maximize one aggregate score.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 42: Regenerate After Damage</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-42/</link>
      <pubDate>Mon, 10 Aug 2026 20:38:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-42/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-42-regenerate-after-damage&#34;&gt;Cellular Automata From First Principles 42: Regenerate After Damage&lt;/h1&gt;&#xA;&lt;p&gt;Persistence asks whether the organism can remain near its target.&lt;/p&gt;&#xA;&lt;p&gt;Regeneration asks a different question:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;after part of the state is destroyed, can local rules reconstruct the missing structure?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a much stronger test.&lt;/p&gt;&#xA;&lt;h2 id=&#34;damage-the-state-not-just-the-image&#34;&gt;Damage the state, not just the image&lt;/h2&gt;&#xA;&lt;p&gt;If we erase only visible RGBA channels but leave hidden channels untouched, the model may retain a perfect invisible blueprint.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 45: Learn to Solve Mazes</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-45/</link>
      <pubDate>Mon, 10 Aug 2026 20:38:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-45/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-45-learn-to-solve-mazes&#34;&gt;Cellular Automata From First Principles 45: Learn to Solve Mazes&lt;/h1&gt;&#xA;&lt;p&gt;A pathfinding NCA becomes interesting only when the training problem itself is disciplined.&lt;/p&gt;&#xA;&lt;p&gt;If every maze has the same size, wall density and corridor style, the model may learn the dataset more than the algorithm.&lt;/p&gt;&#xA;&lt;p&gt;So this chapter builds the training system around &lt;strong&gt;procedural variation&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;generate-mazes-as-data&#34;&gt;Generate mazes as data&lt;/h2&gt;&#xA;&lt;p&gt;Start with binary occupancy:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 = open&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 = wall&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;One simple generator begins with random walls and rejects disconnected examples.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 41: Train for Persistence</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-41/</link>
      <pubDate>Mon, 10 Aug 2026 20:37:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-41/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-41-train-for-persistence&#34;&gt;Cellular Automata From First Principles 41: Train for Persistence&lt;/h1&gt;&#xA;&lt;p&gt;Growing a target once is not enough.&lt;/p&gt;&#xA;&lt;p&gt;A useful self-organizing system should continue to satisfy its objective after it arrives.&lt;/p&gt;&#xA;&lt;p&gt;That means the target should behave more like an &lt;strong&gt;attractor&lt;/strong&gt; than a timestamped frame.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-failure-mode&#34;&gt;The failure mode&lt;/h2&gt;&#xA;&lt;p&gt;Suppose training always evaluates at step 64.&lt;/p&gt;&#xA;&lt;p&gt;The model can learn:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;seed&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grow&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;target at step 64&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;overshoot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;disintegrate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The loss never sees the failure after step 64.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 44: Neural Cellular Automata for Pathfinding</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-44/</link>
      <pubDate>Mon, 10 Aug 2026 20:37:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-44/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-44-neural-cellular-automata-for-pathfinding&#34;&gt;Cellular Automata From First Principles 44: Neural Cellular Automata for Pathfinding&lt;/h1&gt;&#xA;&lt;p&gt;Until now our neural cellular automata have learned to &lt;strong&gt;make and maintain shapes&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Now we will ask them to compute something.&lt;/p&gt;&#xA;&lt;p&gt;Given:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;walls&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;start&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;finish&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;can a shared local update rule discover a path?&lt;/p&gt;&#xA;&lt;p&gt;This is an unusually good task for an NCA because classical pathfinding already has a local interpretation.&lt;/p&gt;&#xA;&lt;p&gt;Breadth-first search expands a frontier:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;start&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nearby reachable cells&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;next layer of reachable cells&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;goal&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That looks remarkably like information propagating through a cellular system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 40: Randomize the Update Schedule</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-40/</link>
      <pubDate>Mon, 10 Aug 2026 20:36:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-40/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-40-randomize-the-update-schedule&#34;&gt;Cellular Automata From First Principles 40: Randomize the Update Schedule&lt;/h1&gt;&#xA;&lt;p&gt;Most cellular automata in this book have used synchronous updates:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;all cells observe state_t&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;all cells update&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state_t+1 appears&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Neural cellular automata become more robust when we stop assuming perfect global synchronization.&lt;/p&gt;&#xA;&lt;h2 id=&#34;stochastic-firing&#34;&gt;Stochastic firing&lt;/h2&gt;&#xA;&lt;p&gt;Instead of applying every predicted update, sample a binary mask:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;stochastic_update&lt;/span&gt;(x, dx, fire_rate&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0.5&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    mask &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; (&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        torch&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;rand(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            x&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;shape[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;], &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, x&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;shape[&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;], x&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;shape[&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;],&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            device&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;x&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;device,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ) &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;=&lt;/span&gt; fire_rate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; x &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; dx &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; mask&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Half the cells update on average.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 39: Grow a Target From One Seed</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-39/</link>
      <pubDate>Mon, 10 Aug 2026 20:35:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-39/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-39-grow-a-target-from-one-seed&#34;&gt;Cellular Automata From First Principles 39: Grow a Target From One Seed&lt;/h1&gt;&#xA;&lt;p&gt;Now we can pose the central morphogenesis problem:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Start from one cell and learn local rules that construct a target pattern.&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;prepare-a-target&#34;&gt;Prepare a target&lt;/h2&gt;&#xA;&lt;p&gt;Assume an RGBA image has been loaded into a tensor:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# shape: [1, 4, H, W], values in [0, 1]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;target &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; load_target(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;target.png&amp;#34;&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;to(DEVICE)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The NCA state contains more channels than the image, so only the visible channels are compared:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 38: Hidden Cell Channels and Local Memory</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-38/</link>
      <pubDate>Mon, 10 Aug 2026 20:34:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-38/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-38-hidden-cell-channels-and-local-memory&#34;&gt;Cellular Automata From First Principles 38: Hidden Cell Channels and Local Memory&lt;/h1&gt;&#xA;&lt;p&gt;A visible pixel is not enough state for a cell that must also coordinate growth.&lt;/p&gt;&#xA;&lt;p&gt;So give every cell a vector.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[R, G, B, alpha, h1, h2, ... h12]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The first channels can be rendered. The rest are private internal state.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANNELS &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;16&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VISIBLE &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; torch&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;zeros(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, CHANNELS, &lt;span style=&#34;color:#ae81ff&#34;&gt;64&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;64&lt;/span&gt;, device&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;DEVICE)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The hidden channels have no labels. We do not tell the model that channel 8 means &amp;ldquo;distance from the centre&amp;rdquo; or channel 11 means &amp;ldquo;grow east&amp;rdquo;. If useful internal signals exist, training must discover them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 37: Learn the Local Update Rule</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-37/</link>
      <pubDate>Mon, 10 Aug 2026 20:32:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-37/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-37-learn-the-local-update-rule&#34;&gt;Cellular Automata From First Principles 37: Learn the Local Update Rule&lt;/h1&gt;&#xA;&lt;p&gt;A neural cellular automaton does not need a large neural network.&lt;/p&gt;&#xA;&lt;p&gt;It needs a &lt;strong&gt;small local network applied everywhere&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That distinction matters.&lt;/p&gt;&#xA;&lt;p&gt;The intelligence of the system comes less from the size of one cell&amp;rsquo;s computation and more from the repeated interaction of many cells over time.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;perception-first&#34;&gt;Perception first&lt;/h2&gt;&#xA;&lt;p&gt;Each cell needs information about itself and nearby cells.&lt;/p&gt;&#xA;&lt;p&gt;For a single visible channel we can compute several local features:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 36: Make the Automaton Differentiable</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-36/</link>
      <pubDate>Mon, 10 Aug 2026 20:31:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-36/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-36-make-the-automaton-differentiable&#34;&gt;Cellular Automata From First Principles 36: Make the Automaton Differentiable&lt;/h1&gt;&#xA;&lt;p&gt;So far every rule in this book has been chosen by us.&lt;/p&gt;&#xA;&lt;p&gt;Even Lenia still asks us to decide the neighborhood kernel, the growth function and the parameters that connect them.&lt;/p&gt;&#xA;&lt;p&gt;What if we stop designing the local rule directly?&lt;/p&gt;&#xA;&lt;p&gt;What if we define only the &lt;strong&gt;goal&lt;/strong&gt;, then let gradient descent discover a local update rule that achieves it?&lt;/p&gt;&#xA;&lt;p&gt;That requires one major change:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 35: Flow-Lenia and Mass-Conserving Artificial Life</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-35/</link>
      <pubDate>Mon, 10 Aug 2026 20:06:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-35/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-35-flow-lenia-and-mass-conserving-artificial-life&#34;&gt;Cellular Automata From First Principles 35: Flow-Lenia and Mass-Conserving Artificial Life&lt;/h1&gt;&#xA;&lt;p&gt;Ordinary Lenia updates local state by adding growth:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A(t + dt) = clip(A(t) + dt × G(U))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That means state can be created in one region and destroyed in another.&lt;/p&gt;&#xA;&lt;p&gt;For many artificial-life experiments that is perfectly acceptable.&lt;/p&gt;&#xA;&lt;p&gt;But it leaves a major question:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What changes if local structure must reorganize &lt;strong&gt;existing mass&lt;/strong&gt; instead of creating or deleting it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 34: Damage, Robustness and Persistence</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-34/</link>
      <pubDate>Mon, 10 Aug 2026 20:03:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-34/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-34-damage-robustness-and-persistence&#34;&gt;Cellular Automata From First Principles 34: Damage, Robustness and Persistence&lt;/h1&gt;&#xA;&lt;p&gt;A pattern that survives in perfect conditions is only the beginning.&lt;/p&gt;&#xA;&lt;p&gt;A stronger artificial-life question is:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;What happens when the pattern is disturbed?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;We can turn that into an experiment.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;define-damage-explicitly&#34;&gt;Define damage explicitly&lt;/h2&gt;&#xA;&lt;p&gt;Start with a rectangular ablation:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;damage_rectangle&lt;/span&gt;(state, y0, y1, x0, x1):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    damaged &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; state&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;copy()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    damaged[&lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;, y0:y1, x0:x1] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; damaged&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For a single-channel state:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;damaged &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; damage_rectangle(state, &lt;span style=&#34;color:#ae81ff&#34;&gt;55&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;70&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;55&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;70&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For multi-channel state, the ellipsis damages all channels in the same spatial region.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 33: Multi-Kernel and Multi-Channel Lenia</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-33/</link>
      <pubDate>Mon, 10 Aug 2026 20:00:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-33/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-33-multi-kernel-and-multi-channel-lenia&#34;&gt;Cellular Automata From First Principles 33: Multi-Kernel and Multi-Channel Lenia&lt;/h1&gt;&#xA;&lt;p&gt;Our Lenia implementation has one scalar field:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A(x, y)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and one kernel:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;K&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That is enough for rich behavior.&lt;/p&gt;&#xA;&lt;p&gt;But it also forces every local process to share the same spatial scale and the same state variable.&lt;/p&gt;&#xA;&lt;p&gt;A richer model can use multiple channels:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A0(x, y)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A1(x, y)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A2(x, y)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and multiple kernels linking them.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;represent-state-as-channels&#34;&gt;Represent state as channels&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;channels &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;zeros((channels, &lt;span style=&#34;color:#ae81ff&#34;&gt;128&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;128&lt;/span&gt;), dtype&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;float64)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now each cell has a vector state:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 32: Search Lenia Parameter Space</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-32/</link>
      <pubDate>Mon, 10 Aug 2026 19:57:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-32/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-32-search-lenia-parameter-space&#34;&gt;Cellular Automata From First Principles 32: Search Lenia Parameter Space&lt;/h1&gt;&#xA;&lt;p&gt;A Lenia pattern is not defined by its initial state alone.&lt;/p&gt;&#xA;&lt;p&gt;It also lives inside a particular dynamical world.&lt;/p&gt;&#xA;&lt;p&gt;Change the kernel or growth function slightly and the same seed may:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;die&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;explode&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;freeze&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;oscillate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;move&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;split&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stabilize into a different morphology&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So discovery has two coupled search spaces:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initial condition&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      +&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;world parameters&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;&#xA;&lt;h2 id=&#34;define-parameter-ranges&#34;&gt;Define parameter ranges&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PARAM_RANGES &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;radius&amp;#34;&lt;/span&gt;: (&lt;span style=&#34;color:#ae81ff&#34;&gt;8&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;24&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ring_center&amp;#34;&lt;/span&gt;: (&lt;span style=&#34;color:#ae81ff&#34;&gt;0.25&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.75&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ring_width&amp;#34;&lt;/span&gt;: (&lt;span style=&#34;color:#ae81ff&#34;&gt;0.05&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.25&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;mu&amp;#34;&lt;/span&gt;: (&lt;span style=&#34;color:#ae81ff&#34;&gt;0.05&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.30&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sigma&amp;#34;&lt;/span&gt;: (&lt;span style=&#34;color:#ae81ff&#34;&gt;0.01&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.08&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;dt&amp;#34;&lt;/span&gt;: (&lt;span style=&#34;color:#ae81ff&#34;&gt;0.03&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.20&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;These ranges are experimental choices.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 31: Discover Your First Lenia Organisms</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-31/</link>
      <pubDate>Mon, 10 Aug 2026 19:54:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-31/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-31-discover-your-first-lenia-organisms&#34;&gt;Cellular Automata From First Principles 31: Discover Your First Lenia Organisms&lt;/h1&gt;&#xA;&lt;p&gt;Running Lenia is easy.&lt;/p&gt;&#xA;&lt;p&gt;Finding persistent, localized, non-trivial structures is the hard part.&lt;/p&gt;&#xA;&lt;p&gt;This chapter turns that problem into a repeatable search pipeline.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;define-what-counts-as-a-candidate&#34;&gt;Define what counts as a candidate&lt;/h2&gt;&#xA;&lt;p&gt;We should not start with the vague objective:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Find something that looks alive.&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Instead define measurable properties.&lt;/p&gt;&#xA;&lt;p&gt;A useful first candidate might be:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;survives for 1,000 steps&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stays localized&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;keeps non-zero mass&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;continues changing&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;avoids filling the whole board&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Each condition removes a different failure mode.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 30: Build Lenia From First Principles</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-30/</link>
      <pubDate>Mon, 10 Aug 2026 19:51:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-30/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-30-build-lenia-from-first-principles&#34;&gt;Cellular Automata From First Principles 30: Build Lenia From First Principles&lt;/h1&gt;&#xA;&lt;p&gt;We now have every conceptual component needed for a minimal Lenia implementation:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;continuous state&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;radial kernel&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;convolution&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;smooth growth function&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;small time step&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bounded update&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This chapter assembles them into one runnable system.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;represent-the-model-parameters-explicitly&#34;&gt;Represent the model parameters explicitly&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; dataclasses &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; dataclass&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@dataclass&lt;/span&gt;(frozen&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;LeniaConfig&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    radius: int &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;13&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ring_center: float &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.5&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ring_width: float &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.15&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    mu: float &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.15&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sigma: float &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.03&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    dt: float &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Keeping parameters in one object makes experiments reproducible.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 29: Growth Functions</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-29/</link>
      <pubDate>Mon, 10 Aug 2026 19:48:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-29/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-29-growth-functions&#34;&gt;Cellular Automata From First Principles 29: Growth Functions&lt;/h1&gt;&#xA;&lt;p&gt;We now have two pieces:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;continuous state&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;weighted neighborhood&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But a neighborhood value does not tell us what should happen next.&lt;/p&gt;&#xA;&lt;p&gt;We need a response curve.&lt;/p&gt;&#xA;&lt;p&gt;In Lenia-style systems that curve is usually called a &lt;strong&gt;growth function&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It converts neighborhood potential into local growth or decay.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;a-gaussian-shaped-preference&#34;&gt;A Gaussian-shaped preference&lt;/h2&gt;&#xA;&lt;p&gt;A useful starting point is:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;gaussian_growth&lt;/span&gt;(u, mu&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0.15&lt;/span&gt;, sigma&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0.03&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2.0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;exp(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;((u &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; mu) &lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt; (&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; sigma &lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ) &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output is approximately:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 28: Neighborhoods as Convolution Kernels</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-28/</link>
      <pubDate>Mon, 10 Aug 2026 19:45:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-28/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-28-neighborhoods-as-convolution-kernels&#34;&gt;Cellular Automata From First Principles 28: Neighborhoods as Convolution Kernels&lt;/h1&gt;&#xA;&lt;p&gt;A neighborhood does not have to be a list of nearby coordinates.&lt;/p&gt;&#xA;&lt;p&gt;It can be a &lt;strong&gt;spatial weighting function&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That lets us say:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cells near this radius matter a lot&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cells closer in matter less&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cells farther away do not matter at all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The standard programming tool for applying that same weighted neighborhood everywhere is convolution.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;start-with-a-small-kernel&#34;&gt;Start with a small kernel&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kernel &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;array([&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    [&lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;],&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    [&lt;span style=&#34;color:#ae81ff&#34;&gt;0.1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.6&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.1&lt;/span&gt;],&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    [&lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;],&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Normalize it:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 27: From Discrete Cells to Continuous State</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-27/</link>
      <pubDate>Mon, 10 Aug 2026 19:43:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-27/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-27-from-discrete-cells-to-continuous-state&#34;&gt;Cellular Automata From First Principles 27: From Discrete Cells to Continuous State&lt;/h1&gt;&#xA;&lt;p&gt;So far most of our cellular automata have used a small set of states:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 or 1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;empty / prey / predator&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ready / firing / refractory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That makes rules easy to inspect.&lt;/p&gt;&#xA;&lt;p&gt;But it also forces every update to make a hard categorical decision.&lt;/p&gt;&#xA;&lt;p&gt;What happens if a cell can instead hold &lt;strong&gt;any value between 0 and 1&lt;/strong&gt;?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 26: Cellular Automata as Computation</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-26/</link>
      <pubDate>Mon, 10 Aug 2026 18:59:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-26/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-26-cellular-automata-as-computation&#34;&gt;Cellular Automata From First Principles 26: Cellular Automata as Computation&lt;/h1&gt;&#xA;&lt;p&gt;A cellular automaton is a state machine distributed across space.&lt;/p&gt;&#xA;&lt;p&gt;Each cell reads local information, applies the same transition rule, and writes a new state.&lt;/p&gt;&#xA;&lt;p&gt;That is already a form of computation.&lt;/p&gt;&#xA;&lt;p&gt;The deeper question is whether local patterns can carry, transform and combine information in a way that supports general computation.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;information-needs-carriers&#34;&gt;Information needs carriers&lt;/h2&gt;&#xA;&lt;p&gt;In ordinary software, information lives in variables and memory addresses.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 25: Evolve Rules for Desired Behaviour</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-25/</link>
      <pubDate>Mon, 10 Aug 2026 18:58:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-25/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-25-evolve-rules-for-desired-behaviour&#34;&gt;Cellular Automata From First Principles 25: Evolve Rules for Desired Behaviour&lt;/h1&gt;&#xA;&lt;p&gt;Once we can represent a rule, mutate it and measure its behavior, we can evolve cellular automata.&lt;/p&gt;&#xA;&lt;p&gt;The key idea is simple:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;population of rules&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;simulate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;measure&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;select&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mutate&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;repeat&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This chapter builds that loop without hiding it behind an optimization framework.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;represent-a-rule-as-bits&#34;&gt;Represent a rule as bits&lt;/h2&gt;&#xA;&lt;p&gt;For an elementary CA, eight output bits completely define the rule:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 24: Search Larger Rule Spaces</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-24/</link>
      <pubDate>Mon, 10 Aug 2026 18:57:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-24/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-24-search-larger-rule-spaces&#34;&gt;Cellular Automata From First Principles 24: Search Larger Rule Spaces&lt;/h1&gt;&#xA;&lt;p&gt;The 256 elementary rules are small enough to enumerate.&lt;/p&gt;&#xA;&lt;p&gt;Most interesting cellular-automata design spaces are not.&lt;/p&gt;&#xA;&lt;p&gt;Add more states, a larger neighborhood, continuous parameters, or several channels and exhaustive search quickly becomes impossible.&lt;/p&gt;&#xA;&lt;p&gt;So we need search strategies.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;why-the-rule-space-explodes&#34;&gt;Why the rule space explodes&lt;/h2&gt;&#xA;&lt;p&gt;For &lt;code&gt;k&lt;/code&gt; possible cell states and a neighborhood containing &lt;code&gt;n&lt;/code&gt; cells, there are:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;k^n possible neighborhood configurations&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A deterministic rule chooses one of &lt;code&gt;k&lt;/code&gt; outputs for every configuration, giving:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 23: Search All 256 Elementary Rules</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-23/</link>
      <pubDate>Mon, 10 Aug 2026 18:56:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-23/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-23-search-all-256-elementary-rules&#34;&gt;Cellular Automata From First Principles 23: Search All 256 Elementary Rules&lt;/h1&gt;&#xA;&lt;p&gt;Elementary cellular automata give us a rare luxury.&lt;/p&gt;&#xA;&lt;p&gt;The complete rule space is tiny.&lt;/p&gt;&#xA;&lt;p&gt;There are only:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;256 rules&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So we do not need sampling, intuition or famous examples.&lt;/p&gt;&#xA;&lt;p&gt;We can evaluate every rule.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;build-an-experiment-runner&#34;&gt;Build an experiment runner&lt;/h2&gt;&#xA;&lt;p&gt;Assume we already have:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;run_rule(rule_number, width, generations, initial_state)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fingerprint(history)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then exhaustive search is simple:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;scan_rules&lt;/span&gt;(initial_state, width&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;201&lt;/span&gt;, generations&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;200&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    records &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; []&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; rule &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; range(&lt;span style=&#34;color:#ae81ff&#34;&gt;256&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        history &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; run_rule(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            rule,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            width&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;width,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            generations&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;generations,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            initial_state&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;initial_state,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        records&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;append({&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;rule&amp;#34;&lt;/span&gt;: rule,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#f92672&#34;&gt;**&lt;/span&gt;fingerprint(history),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        })&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; records&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The hard part is no longer execution.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 22: Classify Rule Behaviour</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-22/</link>
      <pubDate>Mon, 10 Aug 2026 18:55:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-22/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-22-classify-rule-behaviour&#34;&gt;Cellular Automata From First Principles 22: Classify Rule Behaviour&lt;/h1&gt;&#xA;&lt;p&gt;Cellular automata are often described using four broad behavioral classes:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Class I   -&amp;gt; settles to homogeneous behavior&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Class II  -&amp;gt; settles to simple stable or periodic structures&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Class III -&amp;gt; chaotic or apparently random behavior&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Class IV  -&amp;gt; persistent local structures and complex interactions&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;These labels are useful vocabulary.&lt;/p&gt;&#xA;&lt;p&gt;But if we want to use them experimentally, we should connect them to measurable evidence rather than treating them as magic categories.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 21: Sensitivity to Initial Conditions</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-21/</link>
      <pubDate>Mon, 10 Aug 2026 18:54:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-21/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-21-sensitivity-to-initial-conditions&#34;&gt;Cellular Automata From First Principles 21: Sensitivity to Initial Conditions&lt;/h1&gt;&#xA;&lt;p&gt;Change one cell.&lt;/p&gt;&#xA;&lt;p&gt;Then run the same rule twice.&lt;/p&gt;&#xA;&lt;p&gt;If the two futures remain almost identical, the rule is insensitive to that perturbation.&lt;/p&gt;&#xA;&lt;p&gt;If the difference spreads, the rule amplifies local uncertainty.&lt;/p&gt;&#xA;&lt;p&gt;That is one of the cleanest experiments we can perform on a cellular automaton.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;create-two-nearby-initial-states&#34;&gt;Create two nearby initial states&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;width &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;201&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;base &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;zeros(width, dtype&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;uint8)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;base[width &lt;span style=&#34;color:#f92672&#34;&gt;//&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;perturbed &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; base&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;copy()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;perturbed[width &lt;span style=&#34;color:#f92672&#34;&gt;//&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;^=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The two states differ by exactly one bit.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 20: Periodicity and Attractors</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-20/</link>
      <pubDate>Mon, 10 Aug 2026 18:53:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-20/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-20-periodicity-and-attractors&#34;&gt;Cellular Automata From First Principles 20: Periodicity and Attractors&lt;/h1&gt;&#xA;&lt;p&gt;Many cellular automata eventually repeat.&lt;/p&gt;&#xA;&lt;p&gt;A fixed point repeats every generation.&lt;/p&gt;&#xA;&lt;p&gt;An oscillator repeats after several generations.&lt;/p&gt;&#xA;&lt;p&gt;On a finite grid, deterministic cellular automata must eventually revisit a previous state because only finitely many states exist.&lt;/p&gt;&#xA;&lt;p&gt;That makes cycle detection a fundamental measurement.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;hash-each-state&#34;&gt;Hash each state&lt;/h2&gt;&#xA;&lt;p&gt;For binary arrays we can store the bytes:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;state_key&lt;/span&gt;(state):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; state&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;tobytes()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then track when each state first appeared:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 19: Entropy and Information</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-19/</link>
      <pubDate>Mon, 10 Aug 2026 18:52:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-19/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-19-entropy-and-information&#34;&gt;Cellular Automata From First Principles 19: Entropy and Information&lt;/h1&gt;&#xA;&lt;p&gt;A row with almost all zeros is highly predictable.&lt;/p&gt;&#xA;&lt;p&gt;A row containing a balanced mixture of zeros and ones is less predictable.&lt;/p&gt;&#xA;&lt;p&gt;Shannon entropy gives us a precise way to measure that uncertainty.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;binary-entropy&#34;&gt;Binary entropy&lt;/h2&gt;&#xA;&lt;p&gt;If a binary state contains a fraction &lt;code&gt;p&lt;/code&gt; of ones, then:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;H = -p log2(p) - (1-p) log2(1-p)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In Python:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; math&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;binary_entropy&lt;/span&gt;(state):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    p &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; float(np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;mean(state))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; p &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; (&lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;(p &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; math&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;log2(p) &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; (&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; p) &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; math&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;log2(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; p))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The maximum is &lt;code&gt;1&lt;/code&gt; bit when zeros and ones occur equally often.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 18: Activity, Density and Change</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-18/</link>
      <pubDate>Mon, 10 Aug 2026 18:51:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-18/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-18-activity-density-and-change&#34;&gt;Cellular Automata From First Principles 18: Activity, Density and Change&lt;/h1&gt;&#xA;&lt;p&gt;A cellular automaton can look busy while doing very little that persists.&lt;/p&gt;&#xA;&lt;p&gt;It can also look visually quiet while preserving a small moving structure for hundreds of generations.&lt;/p&gt;&#xA;&lt;p&gt;So we need to separate several properties that are easy to confuse:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;occupancy&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;temporal change&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;spatial variation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;persistence&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This chapter turns those ideas into explicit measurements.&lt;/p&gt;&#xA;&lt;p&gt;Together they form our first useful &lt;strong&gt;behavioral fingerprint&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 16: Generate Textures with Local Rules</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-16/</link>
      <pubDate>Mon, 10 Aug 2026 18:50:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-16/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-16-generate-textures-with-local-rules&#34;&gt;Cellular Automata From First Principles 16: Generate Textures with Local Rules&lt;/h1&gt;&#xA;&lt;p&gt;Cellular automata do not need to represent a literal physical system.&lt;/p&gt;&#xA;&lt;p&gt;They can also be used as visual machines.&lt;/p&gt;&#xA;&lt;p&gt;The same ingredients we have used throughout the book:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;local state&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;neighborhood perception&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;shared update&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;repetition&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;can generate masks, growth patterns, surface variation and animation.&lt;/p&gt;&#xA;&lt;p&gt;The evaluation question changes.&lt;/p&gt;&#xA;&lt;p&gt;Instead of asking:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Is this physically accurate?&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;we ask:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Does this local process produce useful, controllable visual structure?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 17: Measure a Cellular Automaton</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-17/</link>
      <pubDate>Mon, 10 Aug 2026 18:50:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-17/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-17-measure-a-cellular-automaton&#34;&gt;Cellular Automata From First Principles 17: Measure a Cellular Automaton&lt;/h1&gt;&#xA;&lt;p&gt;Up to this point we have mostly &lt;strong&gt;looked at&lt;/strong&gt; cellular automata.&lt;/p&gt;&#xA;&lt;p&gt;That is useful.&lt;/p&gt;&#xA;&lt;p&gt;It is also limiting.&lt;/p&gt;&#xA;&lt;p&gt;A human can inspect a handful of spacetime diagrams.&lt;/p&gt;&#xA;&lt;p&gt;We cannot reliably inspect:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;256 elementary rules&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;× several initial conditions&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;× several widths&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;× hundreds of generations&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;× repeated stochastic runs&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;by eye.&lt;/p&gt;&#xA;&lt;p&gt;If we want to compare rules, search for interesting behavior or eventually optimize a rule for some objective, we need to turn behavior into data.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 15: Grow Terrain from Local Height Rules</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-15/</link>
      <pubDate>Mon, 10 Aug 2026 18:48:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-15/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-15-grow-terrain-from-local-height-rules&#34;&gt;Cellular Automata From First Principles 15: Grow Terrain from Local Height Rules&lt;/h1&gt;&#xA;&lt;p&gt;Binary caves ask:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wall or floor?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Terrain needs richer state.&lt;/p&gt;&#xA;&lt;p&gt;Let each cell store a height:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0.0 = low&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1.0 = high&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now local rules can smooth, raise, erode and classify terrain.&lt;/p&gt;&#xA;&lt;p&gt;The challenge is not creating a pretty array.&lt;/p&gt;&#xA;&lt;p&gt;It is creating a process whose output we can explain and control.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;start-with-a-height-field&#34;&gt;Start with a height field&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;random_heightmap&lt;/span&gt;(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    rows&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;120&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    cols&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;160&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    seed&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;42&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    rng &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;random&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;default_rng(seed)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; rng&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;random(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (rows, cols)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Raw independent noise contains variation but little large-scale geography.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 14: Generate Caves from Noise</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-14/</link>
      <pubDate>Mon, 10 Aug 2026 18:46:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-14/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-14-generate-caves-from-noise&#34;&gt;Cellular Automata From First Principles 14: Generate Caves from Noise&lt;/h1&gt;&#xA;&lt;p&gt;A cave generator can be built from a mechanism we already understand:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;random initial cells&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;count nearby walls&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apply local smoothing rule&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;repeat a few times&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stop and use the result&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Unlike a forest-fire simulation, we are not trying to model an indefinitely evolving world.&lt;/p&gt;&#xA;&lt;p&gt;Here the cellular automaton is a &lt;strong&gt;construction process&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 13: Build a Predator-Prey Ecosystem</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-13/</link>
      <pubDate>Mon, 10 Aug 2026 18:44:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-13/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-13-build-a-predator-prey-ecosystem&#34;&gt;Cellular Automata From First Principles 13: Build a Predator-Prey Ecosystem&lt;/h1&gt;&#xA;&lt;p&gt;A forest fire mostly transforms cells in place.&lt;/p&gt;&#xA;&lt;p&gt;Rule 184 moves occupancy in one constrained direction.&lt;/p&gt;&#xA;&lt;p&gt;An ecosystem adds a harder problem:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;organisms move&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;organisms reproduce&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;predators consume prey&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;several organisms may want one destination&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now local intentions can conflict.&lt;/p&gt;&#xA;&lt;p&gt;That means update semantics become part of the model.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;separate-visible-kind-from-internal-state&#34;&gt;Separate visible kind from internal state&lt;/h2&gt;&#xA;&lt;p&gt;Start with:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 = empty&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 = prey&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2 = predator&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;EMPTY &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PREY &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PREDATOR &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kind &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;zeros(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    dtype&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;uint8,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A richer model may need predator energy, age or reproduction state.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 12: Reaction-Diffusion and Pattern Formation</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-12/</link>
      <pubDate>Mon, 10 Aug 2026 18:42:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-12/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-12-reaction-diffusion-and-pattern-formation&#34;&gt;Cellular Automata From First Principles 12: Reaction-Diffusion and Pattern Formation&lt;/h1&gt;&#xA;&lt;p&gt;Diffusion smooths differences.&lt;/p&gt;&#xA;&lt;p&gt;Reaction can amplify them.&lt;/p&gt;&#xA;&lt;p&gt;Put the two processes together and a nearly uniform field can develop persistent spots, stripes and fronts.&lt;/p&gt;&#xA;&lt;p&gt;We will use a discrete Gray-Scott reaction-diffusion simulation because it gives us a compact bridge from local cellular updates to continuous pattern-forming dynamics.&lt;/p&gt;&#xA;&lt;p&gt;Each lattice cell stores two values:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;U = concentration of chemical U&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;V = concentration of chemical V&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So our cell state is now a vector:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 11: Diffusion as Local Exchange</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-11/</link>
      <pubDate>Mon, 10 Aug 2026 18:40:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-11/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-11-diffusion-as-local-exchange&#34;&gt;Cellular Automata From First Principles 11: Diffusion as Local Exchange&lt;/h1&gt;&#xA;&lt;p&gt;Until now most cells have stored discrete state:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 / 1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;empty / tree / fire&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;road / car&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now let each cell store a continuous quantity.&lt;/p&gt;&#xA;&lt;p&gt;For diffusion:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state[y, x] = concentration&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The local transition is no longer birth, death or movement.&lt;/p&gt;&#xA;&lt;p&gt;It is local exchange.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;start-with-a-pulse&#34;&gt;Start with a pulse&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;size &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;121&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grid &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;zeros(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (size, size),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    dtype&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;float64,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grid[&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    size &lt;span style=&#34;color:#f92672&#34;&gt;//&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    size &lt;span style=&#34;color:#f92672&#34;&gt;//&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1.0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At the beginning one cell contains all the concentration.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 10: Simulate Traffic with Rule 184</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-10/</link>
      <pubDate>Mon, 10 Aug 2026 18:38:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-10/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-10-simulate-traffic-with-rule-184&#34;&gt;Cellular Automata From First Principles 10: Simulate Traffic with Rule 184&lt;/h1&gt;&#xA;&lt;p&gt;Rule 184 is a beautiful example of moving from an abstract rule table to a model with a concrete interpretation.&lt;/p&gt;&#xA;&lt;p&gt;Use a one-dimensional ring road:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 = car&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 = empty road&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A car moves one cell to the right when the destination is empty.&lt;/p&gt;&#xA;&lt;p&gt;That is enough to produce free flow, queues and a macroscopic density-flow relationship.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;write-the-traffic-mechanism-directly&#34;&gt;Write the traffic mechanism directly&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;traffic_step&lt;/span&gt;(road):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    cars &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; road &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    empty_ahead &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; (&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;roll(road, &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    moving &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; cars &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt; empty_ahead&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    next_road &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; road&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;copy()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    next_road[moving] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    next_road[&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;roll(moving, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; next_road&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The road is periodic, so the final road cell connects back to the first.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 09: Build a Forest Fire Simulation</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-09/</link>
      <pubDate>Mon, 10 Aug 2026 18:36:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-09/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-09-build-a-forest-fire-simulation&#34;&gt;Cellular Automata From First Principles 09: Build a Forest Fire Simulation&lt;/h1&gt;&#xA;&lt;p&gt;A forest fire is almost an ideal cellular-automaton exercise.&lt;/p&gt;&#xA;&lt;p&gt;The visible states are obvious:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;0 = empty&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 = tree&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2 = burning&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The interactions are local.&lt;/p&gt;&#xA;&lt;p&gt;And small changes in fuel density or ignition assumptions can produce very different global outcomes.&lt;/p&gt;&#xA;&lt;p&gt;This is not intended as a high-fidelity wildfire model.&lt;/p&gt;&#xA;&lt;p&gt;It is a deliberately simplified &lt;strong&gt;spread model&lt;/strong&gt; designed to isolate one mechanism:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 08: Add Randomness Without Losing the Model</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-08/</link>
      <pubDate>Mon, 10 Aug 2026 18:34:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-08/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-08-add-randomness-without-losing-the-model&#34;&gt;Cellular Automata From First Principles 08: Add Randomness Without Losing the Model&lt;/h1&gt;&#xA;&lt;p&gt;So far every transition in the book has been deterministic.&lt;/p&gt;&#xA;&lt;p&gt;Given the same state, the next state is fixed.&lt;/p&gt;&#xA;&lt;p&gt;That makes deterministic automata unusually easy to debug: if we preserve the initial condition and rule, we preserve the trajectory.&lt;/p&gt;&#xA;&lt;p&gt;But many useful models need another ingredient.&lt;/p&gt;&#xA;&lt;p&gt;A tree may ignite.&lt;/p&gt;&#xA;&lt;p&gt;An organism may reproduce.&lt;/p&gt;&#xA;&lt;p&gt;A driver may hesitate.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 07: Beyond Conway — Life-like and Multi-State Rules</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-07/</link>
      <pubDate>Mon, 10 Aug 2026 18:27:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-07/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-07-beyond-conway--life-like-and-multi-state-rules&#34;&gt;Cellular Automata From First Principles 07: Beyond Conway — Life-like and Multi-State Rules&lt;/h1&gt;&#xA;&lt;p&gt;Conway&amp;rsquo;s Game of Life is famous enough that it can accidentally become the definition of cellular automata.&lt;/p&gt;&#xA;&lt;p&gt;It is not.&lt;/p&gt;&#xA;&lt;p&gt;Life is one point in a much larger design space.&lt;/p&gt;&#xA;&lt;p&gt;Keep the same two-dimensional grid and the same eight-cell Moore neighborhood, then change only the birth and survival counts.&lt;/p&gt;&#xA;&lt;p&gt;You immediately get a family of &lt;strong&gt;Life-like cellular automata&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 06: Patterns as Data — Oscillators, Spaceships and Gliders</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-06/</link>
      <pubDate>Mon, 10 Aug 2026 18:26:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-06/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-06-patterns-as-data--oscillators-spaceships-and-gliders&#34;&gt;Cellular Automata From First Principles 06: Patterns as Data — Oscillators, Spaceships and Gliders&lt;/h1&gt;&#xA;&lt;p&gt;Once we can run Conway&amp;rsquo;s Game of Life, the next step is not to add more graphics.&lt;/p&gt;&#xA;&lt;p&gt;It is to make the patterns themselves inspectable.&lt;/p&gt;&#xA;&lt;p&gt;A blinker is not interesting because somebody named it.&lt;/p&gt;&#xA;&lt;p&gt;It is interesting because it returns to the same state after two generations.&lt;/p&gt;&#xA;&lt;p&gt;A glider is not interesting because it has a familiar shape.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 05: Conway&#39;s Game of Life</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-05/</link>
      <pubDate>Mon, 10 Aug 2026 18:25:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-05/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-05-conways-game-of-life&#34;&gt;Cellular Automata From First Principles 05: Conway&amp;rsquo;s Game of Life&lt;/h1&gt;&#xA;&lt;p&gt;Conway&amp;rsquo;s Game of Life is one of the cleanest examples of complex two-dimensional behavior emerging from a tiny local rule.&lt;/p&gt;&#xA;&lt;p&gt;The world is a grid of dead and live cells.&lt;/p&gt;&#xA;&lt;p&gt;Each cell sees its eight surrounding neighbors.&lt;/p&gt;&#xA;&lt;p&gt;Then four ideas decide the next generation:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;underpopulation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;survival&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;overpopulation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;birth&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The standard rule is usually written &lt;strong&gt;B3/S23&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a dead cell is born with exactly 3 live neighbors,&lt;/li&gt;&#xA;&lt;li&gt;a live cell survives with 2 or 3 live neighbors.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Everything else becomes or remains dead.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 04: Rule 110 and Computation in a Grid</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-04/</link>
      <pubDate>Mon, 10 Aug 2026 18:24:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-04/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-04-rule-110-and-computation-in-a-grid&#34;&gt;Cellular Automata From First Principles 04: Rule 110 and Computation in a Grid&lt;/h1&gt;&#xA;&lt;p&gt;Rule 110 looks like another one-byte transition table.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;111 110 101 100 011 010 001 000&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 0   1   1   0   1   1   1   0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But its behavior gives us a much deeper idea: a cellular automaton can become a computational medium.&lt;/p&gt;&#xA;&lt;p&gt;The important shift is this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pattern generator&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      -&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;signal system&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      -&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;computation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Rule 110 is computationally universal. Matthew Cook published the universality proof in &lt;em&gt;Complex Systems&lt;/em&gt; in 2004, showing that this elementary one-dimensional automaton can emulate universal computation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 03: Rule 30 and the Surprise of Complexity</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-03/</link>
      <pubDate>Mon, 10 Aug 2026 18:23:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-03/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-03-rule-30-and-the-surprise-of-complexity&#34;&gt;Cellular Automata From First Principles 03: Rule 30 and the Surprise of Complexity&lt;/h1&gt;&#xA;&lt;p&gt;Rule 30 is a perfect demonstration of why cellular automata are worth studying.&lt;/p&gt;&#xA;&lt;p&gt;Its transition table contains eight bits:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;111 110 101 100 011 010 001 000&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 0   0   0   1   1   1   1   0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Start from one active cell and repeatedly apply that rule.&lt;/p&gt;&#xA;&lt;p&gt;The result rapidly stops looking like something generated by a tiny deterministic program.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 02: Encode All 256 Elementary Rules</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-02/</link>
      <pubDate>Mon, 10 Aug 2026 18:22:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-02/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-02-encode-all-256-elementary-rules&#34;&gt;Cellular Automata From First Principles 02: Encode All 256 Elementary Rules&lt;/h1&gt;&#xA;&lt;p&gt;An elementary cellular automaton has only three inputs per cell:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;left centre right&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Each input is one bit.&lt;/p&gt;&#xA;&lt;p&gt;That means there are only eight possible neighborhoods:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;111 110 101 100 011 010 001 000&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For each neighborhood the rule chooses either &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Eight binary choices means:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2^8 = 256&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;possible rules.&lt;/p&gt;&#xA;&lt;p&gt;The elegant part is that we can store one complete rule table in one byte.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 01: Build Your First Automaton</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-01/</link>
      <pubDate>Mon, 10 Aug 2026 18:21:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-01/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-01-build-your-first-automaton&#34;&gt;Cellular Automata From First Principles 01: Build Your First Automaton&lt;/h1&gt;&#xA;&lt;p&gt;In the previous chapter we reduced a cellular automaton to four things:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;space&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;neighborhood&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rule&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we are going to build one.&lt;/p&gt;&#xA;&lt;p&gt;Not a framework.&lt;/p&gt;&#xA;&lt;p&gt;Not a library.&lt;/p&gt;&#xA;&lt;p&gt;One update step.&lt;/p&gt;&#xA;&lt;p&gt;That is enough to expose the whole mechanism.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;start-with-a-one-dimensional-world&#34;&gt;Start with a one-dimensional world&lt;/h2&gt;&#xA;&lt;p&gt;Create a row of cells and turn on the centre cell:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; numpy &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; np&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;width &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;41&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;zeros(width, dtype&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;np&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;uint8)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;state[width &lt;span style=&#34;color:#f92672&#34;&gt;//&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(state)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Conceptually:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cellular Automata From First Principles 00: How Can Tiny Rules Build Complex Worlds?</title>
      <link>http://programmer.ie/post/cellular-automata-from-first-principles-00/</link>
      <pubDate>Mon, 10 Aug 2026 18:20:00 +0100</pubDate>
      <guid>http://programmer.ie/post/cellular-automata-from-first-principles-00/</guid>
      <description>&lt;h1 id=&#34;cellular-automata-from-first-principles-00-how-can-tiny-rules-build-complex-worlds&#34;&gt;Cellular Automata From First Principles 00: How Can Tiny Rules Build Complex Worlds?&lt;/h1&gt;&#xA;&lt;p&gt;A cellular automaton begins with almost nothing.&lt;/p&gt;&#xA;&lt;p&gt;You need:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a collection of cells,&lt;/li&gt;&#xA;&lt;li&gt;a state for each cell,&lt;/li&gt;&#xA;&lt;li&gt;a neighborhood,&lt;/li&gt;&#xA;&lt;li&gt;and a rule that tells each cell what to become next.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;That is enough.&lt;/p&gt;&#xA;&lt;p&gt;There is no central controller.&lt;/p&gt;&#xA;&lt;p&gt;There is no object that knows what the final pattern should look like.&lt;/p&gt;&#xA;&lt;p&gt;There is only local state changing through time.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
