•      Sign In
• Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

# Another cellular automaton video

Posted by kiwibonga, 05 April 2011 · 5,810 views

Automata, automaton... Is each cell considered an automaton? Or is the whole thing the automaton? I really have no clue.

How it works:

Similarly to a naive implementation of the Game of Life, the program iterates through every cell in the grid one by one every generation.

For each cell, one neighboring cell is selected at random (uniform 1 in 8 chance of picking any given neighbor).

The behavior that will be executed depends on the current cell being considered. In this demo, there's just 4 cell types: white space and the 3 colors.

Each color has 10 different gradient levels. When I click with the mouse, I insert a cell of level 0. If a whitespace picks a colored cell, and that cell's level is < 9, the whitespace gets replaced with the current color + 1, as if the cell was producing a slightly weaker-colored offspring. That means cells grow randomly outwards until the outer "shell" of a given colored blob cannot divide anymore.

The "feeding" rule follows a rock-paper-scissors principle -- red eats blue, green eats red, and blue eats green. A cell is "upgraded" towards level 0 when it eats another cell, and is "downgraded" or killed if it gets eaten. What that means is that mobility is observed when a blob of cells eats another.

The really fun thing, though, is when 3 colors meet -- this begins an endless feedback loop that produces surprisingly stable, ever-growing spiral patterns.

And there you have it.

EDIT: Heh... Usually, when you post a link to reddit, it's your website that dies... Looks like this time around, reddit's the one dying.

Pretty cool It kinda reminds fractals somehow.
Been staring at it for a while now. Very odd and beautiful.
kiwibonga
Thanks!<br><div><br></div><div>Some <s>potheads </s>people have asked me if they could download this or have the source.</div><div><br></div><div>I can't release anything right away, because there's a dependency on OpenMP -- I had to "steal" the DLL and static library from an open directory on google to get it to work with MSVC++ 2010 Express, and I'm pretty sure I'm not allowed to distribute that...</div><div><br></div><div>Without OpenMP, the performance isn't quite as good, so I'm taking it a step further and writing a GLSL shader that'll take care of updating the grid. I've already seen what a GPU can do with a naive implementation of Conway's Game of Life (over 30x faster with 216 GPU cores vs. 4 CPU cores), so I'm very eager to see how the rock-paper-scissors algorithm fares.</div><div><br></div><div>Once I have the shader up and running, I'll most likely release a little demo + source.</div><div><br></div><div>This is a bit of a deviation from my main project, though -- I was originally working on a "pixel canvas" object to add simple procedural animation/particles to my UI framework... So I don't expect to maintain this much longer after I release the source, but I do have several project ideas for later that will be based on it.</div>
kiwibonga
(Comment got HTML-murdered... Here it is again)

Thanks!

Some potheads people have asked me if they could download this or have the source.

I can't release anything right away, because there's a dependency on OpenMP -- I had to "steal" the DLL and static library from an open directory on google to get it to work with MSVC++ 2010 Express, and I'm pretty sure I'm not allowed to distribute that...

Without OpenMP, the performance isn't quite as good, so I'm taking it a step further and writing a GLSL shader that'll take care of updating the grid. I've already seen what a GPU can do with a naive implementation of Conway's Game of Life (over 30x faster with 216 GPU cores vs. 4 CPU cores), so I'm very eager to see how the rock-paper-scissors algorithm fares.

Once I have the shader up and running, I'll most likely release a little demo + source.

This is a bit of a deviation from my main project, though -- I was originally working on a "pixel canvas" object to add simple procedural animation/particles to my UI framework... So I don't expect to maintain this much longer after I release the source, but I do have several project ideas for later that will be based on it.
kiwibonga
And I forgot to add strikethrough around "potheads" -- so much fail. Oh well.
PARTNERS