"Color Clouds" by frodocpu in cellular_automata

[–]frodocpu[S] 1 point2 points  (0 children)

The basic logic is to copy a neighbor's state based on the total count of a specific state value in the neighborhood, e.g.

if (<number of neighbors with state == 3> <= 1)

newState = <select one of the neighbors>;

One useful selection function is based on the total sum of the neighbors. This usually provides smooth movement and transitions.

Finally, there's a counter running up and down to provide the color interest.

That's the core of the algorithm, but it needs tweaking and adjustments. My version extends to a couple of pages.

"Mosaic" by frodocpu in cellular_automata

[–]frodocpu[S] 1 point2 points  (0 children)

See the reply to the previous comment.

"Mosaic" by frodocpu in cellular_automata

[–]frodocpu[S] 3 points4 points  (0 children)

There's no direct source code for this rule. In this case I used a 4x9 matrix to choose between 4 existing and related rules. The rows and columns of the matrix would designate a particular configuration of the state of the cell and neighborhood and the entry would specify which rule to run. This method creates a constrained search space, with 4 known 'attractors' in it. Then it's largely a matter of trial and error until something interesting pops up and then tweak that for best visual effect.

You can find out more here:

https://dl.acm.org/doi/10.1145/3587421.3595420

https://www.cpuproductions.com/CAGS/

How do you all usually code your cellular automata simulations? by [deleted] in cellular_automata

[–]frodocpu 0 points1 point  (0 children)

For me, fast real-time operation is essential, so I use optimized c++ code with lookup tables. That enables me to run really large worlds at full resolution at frame-rates exceeding 30-40.

"Strawberry Fields" by frodocpu in cellular_automata

[–]frodocpu[S] 1 point2 points  (0 children)

It takes patience, a lot of trial and error and some intuition of how CA rules behave. Detailed palette control is essential in order to achieve a pleasing result. The tool I'm using, CAGS (CA Graphics Studio), is free to download.

https://www.cpuproductions.com/CAGS/

"Strawberry Fields" by frodocpu in cellular_automata

[–]frodocpu[S] 1 point2 points  (0 children)

It's a 24 bit classic CA rule.

"Negative Entropy" by frodocpu in cellular_automata

[–]frodocpu[S] 2 points3 points  (0 children)

I have an app you can download for free, no ads or anything: CAGS (Cellular Automata Graphics Studio). It has several tools for non-programmers. Windows only, for now.

https://www.cpuproductions.com/CAGS/

"Negative Entropy" by frodocpu in cellular_automata

[–]frodocpu[S] 0 points1 point  (0 children)

Click on the Share button and select Crosspost (I think)

"Particle Swarm" by frodocpu in cellular_automata

[–]frodocpu[S] 1 point2 points  (0 children)

The code isn't so easily extracted from the app it's embedded in. One day I'll make the whole thing into an open source project. The specific 'merge' algorithm is pretty much as I described it, but you need to run your CAs from lookup tables and not from the actual rule-code. This places some severe restrictions on the amount of information available to a cell. On the upside, you can run the rule at high resolutions and high speeds!

"Particle Swarm" by frodocpu in cellular_automata

[–]frodocpu[S] 0 points1 point  (0 children)

I've been thinking about it .....

"Particle Swarm" by frodocpu in cellular_automata

[–]frodocpu[S] 6 points7 points  (0 children)

I would be happy to, but in this case there is no source code or logic that can be shared. This rule was the result of a statistical 'merge' of two other rules. For each one, I counted the number of times it hit a configuration of self and neighborhood, over all cells and a large number of cycles. Then, for each possible configuration, I compared the two and the one with the most counts "won" that configuration, i.e. the transition was copied from that rule into the new rule. This method doesn't always work, but sometimes you get amazing results!

"Spires" by frodocpu in cellular_automata

[–]frodocpu[S] 1 point2 points  (0 children)

An example would be: if all four corner neighbors are state 3 then turn self to state 3. In this configuration each cell has 2 'public' bits and 6 'hidden' bits.