lainchan / λ

Cellular Automata

Zhora · 2023-04-09 08:41
Recently I've been thinking about cellular automata. Why don't we have a thread about it? A cellular automata is a system in which cells are updated according to the state of their neighbors. Each cycle, every cell uses the state of it's neighbors to update it's own state. The most famous cellular automata is Conway's game of life (pic related). It is defined by this simple ruleset: 1. If the cell is alive (has a value of 1), and two or three of its neighbors are alive, then it remains alive. 2. If the cell is dead (has a value of 0), and three of it's neighbors are alive, then it comes to life. 3. Otherwise, if the cell dies. Interestingly, this ruleset turns out to be turing-complete. In other words, you could build a computer within the game of life which itself simulates the game of life.
Drifter · 2023-04-09 20:11
>>35065 Conway's game of life is an example of a boolean-valued cellular automata. That is to say, the value of each cell is one of two states. We can also imagine cellular automata that are continuously-valued. That is to say, the value of each cell is a real number. To update each cell, I take a weighted sum of the neighboring cells of the previous iteration. I also pass this value through an "activation function". This can lead to some cool results.
The Phantom Phreak · 2023-04-10 14:40
>To update each cell, I take a weighted sum of the neighboring cells of the previous iteration fun fact: this is essentially a discrete heat equation in an anisotropic material. Although I'm not sure if your 'activation function' has a physical interpretation. How is it incorporated into the CA?
Koichiro · 2023-04-10 18:33
>>35075 The value of a cell on iteration N is the value of it's neighboring cells on iteration N-1, each times it's respective weight, all summed, and passed through this activation function. Conway's game of life can be simulated in this way: Weights: 1.0 1.0 1.0 1.0 10.0 1.0 1.0 1.0 1.0 Activation: if x ∈ [3.0, 12.0, 13.0] 1.0 else 0.0 end Of course, it's not the only way to simulate cellular automata :) but it produces some cool results
Delilah · 2023-04-10 18:49
>>35078 In fact, this approach is similar to how neural networks are computed - except a neural network connects every member of every layer to the next layer, not just the neighbors. Also, neural networks are typically not recursive like this, with a layer's output being the same layer's input, although I've heard of such a thing being used in deep learning. For example, the sigmoid function is used a lot in neural networks to normalize the values to between 0 and 1. By the way, I fuarrrking hate the spam filter.
protected · 2023-04-10 18:59
>>35080 A lot of these seem to produce stripes or checkerboard patterns.
Yuki Nagato · 2023-04-19 14:18
I started building a systematic gallery of cellular automata: https://cenysor.neocities.org/programming/cells/gallery/cells_gallery
byte · 2023-06-17 21:47
I had a post in this thread before about Brians Brain. Why was it removed?
protected · 2023-06-17 22:44
>>36262 Look at the dates of the posts, everything was removed before 2023-4ish. All the posts must have been loaded from an old backup to remove the flood of spam that happened recently.