Sign in to follow this  
  • entries
    18
  • comments
    15
  • views
    45831

Another cellular automaton video

Sign in to follow this  

24927 views

[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.
Sign in to follow this  


6 Comments


Recommended Comments

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>

Share this comment


Link to comment
[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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now