Wednesday, September 6, 2023

Cellular Automata Explosion

I've written a 5-bit version of the cellular automata (CA) code.  So instead of looking at the value of the current and the 2 adjacent pixels (1 left and 1 right of the current position), I'm looking at the current and 4 adjacent pixels (2 left and 2 right).  This mean that the number of Rules for 1 layer is 2^32.

The code also allows for up to three CA layers.  The output of one layer is the input to the next:

Random Input -> Rule1 -> Rule2 -> Rule3 -> output

This is a portion of the output when Rule1 = Rule2 = Rule3 = 789263618

In binary, 789263618 = 0x01000000101011001101000011110100

So the same Rule applied three times in a row.  I get this:



That's interesting, I suppose.  I'm sure PhD dissertations can be written about it.  But for me, the fourier transform is much more interesting.  Here's the FFT of the portion shown above:



And one of the first things I think of is -- how to turn this into sound.  That'll require diving into inverse-FFTs.  Fun stuff.

In any case, maybe there are more 'interesting' CA recipes than I thought.  I'm finding them almost everywhere.

No comments:

Post a Comment