Elementary Cellular Automata (ECA) was a toy model initially created by Von
Neumann and later on studied extensively by Stephen Wolfram, probably since he
was really bored. ECA is a simple model wherein you have cells with binary
states (1 or 0) that evolve through iterations. The evolution rules are defined
by the state at the previous timestep of the cells within the neighborhood the
the cell to be evaluated.
For this implementation, I defined functions that turn binary strings to
decimals and vice versa. This will facilitate the general creation of lookup
tables associated with the rules.
In [1]:
I then initialized an empty array, and initialized the first row a 50-50 percent
chance of being 1 or 0 for each cell in the first row.
In [2]:
I then allowed the system to follow the rules (Rule 30 in particular) and wait
for the resulting imageā¦
In [3]:
Characterizing ECA Rules
Space: Entropy
Measure the Shannon Entropy
\(H = \dfrac{1}{H_{max}} \sum_{i=0}^7 p_i\log{p_i}\)
where $p_i$ is the frequency of all configurations resulting in the microstate
$i$, where $H_{max}$ is the value of $H$ whenn all $p_i=\dfrac{1}{N}$ are equal.
$ \langle H \rangle$ is obtained after disregarding the transient period
(roughly half of the cell length in space).
In [4]:
Time: Kinetic Energy
\(\langle K \rangle_t = \langle |s_{i+1}-s_i|^2\rangle_t\)
This essentially counts the number of times states are flipped averaged across
space and time.
In [5]:
An interesting observation is when you generate all ECA rules, measure their
respective $K$ and $H$ values, we will observe clustering for similarly classed
rules.
In [6]:
128
Wall time: 46.3 s
In [7]:
In [8]:
Wall time: 130 ms
Wall time: 1.46 s
In [9]:
<matplotlib.text.Text at 0xd2d9fd0>
Clustering of ECA
Some form of clustering can be observed using the Entropy and Kinetic Energy
descriptors. However, this clustering cannot be traced back to the types of ECA
rules.