Another cellular automaton video

posted in kiwibonga's Blog
Published April 05, 2011
Advertisement
[media]
[/media]

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.
0 likes 6 comments

Comments

owl
Pretty cool :) It kinda reminds fractals somehow.
April 06, 2011 07:56 PM
Aardvajk
Been staring at it for a while now. Very odd and beautiful.
April 07, 2011 08:45 AM
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>
April 08, 2011 12:19 PM
kiwibonga
[i](Comment got HTML-murdered... Here it is again)[/i]


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.
April 08, 2011 12:23 PM
kiwibonga
And I forgot to add strikethrough around "potheads" -- so much fail. Oh well.
April 08, 2011 12:24 PM
Matt Foy

Just want to say this is a great video and article, and inspired me to create a related system, you can find the source and demos here: https://github.com/MattFoy/CrazyPixels

February 20, 2015 01:10 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement