<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Cycles on Programmer.ie: Modern AI programming</title>
    <link>http://programmer.ie/tags/cycles/</link>
    <description>Recent content in Cycles on Programmer.ie: Modern AI programming</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 10 Aug 2026 18:53:00 +0100</lastBuildDate>
    <atom:link href="http://programmer.ie/tags/cycles/index.xml" rel="self" type="application/rss+xml" />
    <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>
  </channel>
</rss>
