# Questions tagged [cellular-automata]

Questions on the usage of CellularAutomaton and on custom implementations of cellular automata.

74 questions
Filter by
Sorted by
Tagged with
133 views

### Special case of CellularAutomaton

I’m interested in multi-state CA in a closed 2D space and try to implement them using CellularAutomaton but do not understand how to do it. The first question is, ...
• 1,894
48 views

### How to write a function that simulates particle collisions in cellular automata?

I wish to write a function that outputs something like this page's 6th figure, which simulates particle collisions in rule 110. Here is the code for reference ...
1 vote
88 views

### How to change a value in an association in a list for Cellular Automata project?

I'm trying to change a value in an association in a list. This is part of a larger project of creating a function that can mutate a 2D Cellular Automata several times to make it look like another 2D ...
505 views

### Finding a way to skip an iteration in a table

I am creating a project in Wolfram that models oil slicking using Cellular Automata. In my project I have a function called vonNeumann Neighborhood that takes in a radius and a length of a size of a ...
253 views

### Cellular Automaton with larger rules

I want to implement a Cellular Automaton with the following rules: 00011 010 01011 110 10011 010 11000 010 11010 011 11001 010 All remaining patterns ...
1 vote
86 views

### Bounded cellular automaton

By default, initial conditions specified to CellularAutomaton are cyclic: I know that if I add a background, then I avoided the cyclicity, but the automaton then ...
1 vote
188 views

### How to get the algebraic form of cellular automata

In atlas.wolfram.com (see here http://atlas.wolfram.com/01/01/views/173/TableView.html, for example) we can get the algebraic form of any given elementary cellular automaton in 1D. Is there a way to ...
• 65
1 vote
158 views

### On the cycles of 1D (general) and 2D (specific) cellular automata (CA), on the use of GraphPlot and on a specific 2D 4-neighbor square CA

My question has two parts. The first concerns a general feature in 1D cellular automata and the 2nd a specific 2D model. 1st question: In the documentation we can find the command ...
• 65
88 views

### Mobile Automata Colors

Why this code does not generate a mobile automaton plot with color white when the status of the individual cells is 1? ...
• 197
51 views

### Calculate the rule if given the totalistic rule

I was wondering how is it possible to get the rule number if you are given the totalistic rule? I want to have the ruleplot but im given the totalistic rule. I have done this but since my totalistic ...
81 views

### CA - How to get the frequency of the applied rules at a certain timestep in Wolfram Language

From an CA CellularAutomaton[110, {{1},0}, 64] how can I get the frequency of the applied rules at a row/timestep? Meaning, the number of times a rule/subrule has ...
274 views

### Exporting ArrayPlot as PNG (where each value in the array defines one pixel)

relatively new to Wolfram/Mathematica. I'm using wolframscript on ubuntu, and trying to export various Two-Color Automata as PNG files. It works fine for 50 evolutions, but when I do 500 or so, it is ...
79 views

### Game of Life with random lattice and first iterations

I would like to generate a random 100 x 100 Lattice, plot this and then, say, the first 3 iterations of Conway's Game of Life. How can I do this with Mathematica? I only came up with: ...
• 33
354 views

### Function representing a forest fire after one time step

How can I create a function that would have as its argument an array mat of 0s, 1s, and 2s where the 2s are burning trees and the function would give an array that represents the forest after one time ...
• 357
106 views

### Questions on NetMapOperator, NetNestOperator, NetFoldOperator [closed]

I've been playing around with the Higher-Order Network Construction functionality such as NetMapOperator, NetNestOperator, and <...
• 4,405
162 views

### Game of Life (GoL) in 3D cellular automaton and its rule numbers

I walked through How to calculate CellularAutomaton rule numbers in higher dimensions? to produce the following code for the Advent of Code, day 17, which asks for "Life, but in 3D". More ...
• 6,107
101 views

### Create a Cellular Automata rule in Mathematica

I want to create an image in a cellular automata, more specifically an image of an object, like a turtle for example. I found this article online, and i am trying to replicate the results for growing ...
1 vote
70 views

### Add (rainbow) colors to Ruleplot[]

I'm using Ruleplot[] to plot the rules of my cellular automota. I'm using multiple 'colors' (= number of states $k$ ) and I want to color them a different color than the default grayscale. The ...
449 views

### How to write a function from scratch to simulate a cellular automaton

I would like to simulate a simple cellular automaton like this (rule 254), how do you do it from scratch in Mathematica without relying on the high-level function ...
• 609
134 views

### Strategies for making a cellular automaton puzzle

I am making a cellular automaton secret message puzzle for my kids, and am looking for help on strategies to make it. I am relatively new to Mathematica, thank you for your help! The puzzle is a grid ...
• 23
426 views

### How to simulate a cellular automaton on a network?

Unfortunately, I have not yet understood the Neural Network well. Suppose there is simple network (like Kauffman automata): several nodes that can only be in states 1-0, connections between them, and ...
• 1,894
1 vote
124 views

### Specifying rules for cellular automata in Mathematica

The function: CellularAutomaton[73, {{1}, 0}, 4] implements rule 73 for 4 steps with the given initial conditions. How to input this rule, If instead it is to be ...
• 542
67 views

### Why does my TuringMachine rule fail to display correctly using RulePlot?

Why does the following work ...
• 12.9k
552 views

### Animating 2D cellular automata with the entire grid in sight

In animating a 2D cellular automata like this: ...
• 542
231 views

### Find rules for the similar "Conway's Game of Life", and initial input on an 11x11 torus board. Descripted on the "Puzzel Chalenge IBM May"2020"

I solved on May 2020 this using mma . I am aware of this command - Cellular automata. But I can't use it on this challenge, because there's no concept of "Torus" in the CellularAutomaton . ...
• 804
100 views

### Why doesn't RulePlot understand the TuringMachine in the documentation?

The documentation for TuringMachine gives the following example of a machine specified by explicit transitions: ...
• 12.9k
179 views

### How can I get non-totalistic rules for a 2-dimensional cellular automaton?

Specifying (and plotting) the rules of cellular automata in 1-dimension is really straight forward with the code: RulePlot[CellularAutomaton[2]] In this case, we ...
• 243
1 vote
175 views

### mathematica for game of life rule b25/s4

I have the Mathematica code below to show the game of life rule B3/S23, can you please tell me how I can change it in order to show rule B25/s4 ? ...
• 21
49 views

### How can I let Mathematica tell me the rule number for Cellular Automata?

I have this Cellular automata and I now how it behaves but I do not know the rule number. Can I let Mathematica give me the number somehow? ...
• 41
1 vote
42 views

### How to implement Cellular Automaton 5-neighbourhood totalistic CA

I have recently been trying to model a CA for forest fires. I found some useful code on Rosetta code however it is applied to a 9-neighbourhood totalistic model. I'm seeking to implement this, with a ...
• 31
63 views

### Waiting times between cyclical changes in matrix for CellularAutomaton

I have recently been learning my way around the CellularAutomaton function and I'm seeking assistance in calculating the waiting times between changing events at each time step. The CA is setup such ...
• 31
80 views

### How to encode this rule (for visualization, etc) similar to cellular automata?

I came across this rule on Twitter and it reminded me of the cellular automota discussed in NKS: How to encode this in Mathematica for (visual) inspection?
• 3,145
171 views

### Langton's ant algorithm using AnglePath

I would like to implement Langton's ant algorithm using AnglePath. I know there are some MMA implementation on the internet but I would like to implement it myself. Here is definition of algorithm: ...
• 10.9k
618 views

### How to implement the Nagel-Schreckenberg model in Mathematica

I want to implement the Nagel-Schreckenberg model with CellularAutomaton in Mathematica. I saw some code for the traffic model. But what I want is the most basic ...
210 views

### map cellular automaton to planar surface

Im exploring possibility to apply a CA to a portion of a region in an image. Think that I can process an image to identify a region, as an example, a green area. I would like to confine that area, and ...
• 457
967 views

### How to solve (O/P)DE via cellular automaton?

I heard that one can solve differential equations by a cellular automaton. Even though I have searched some papers, which seem too formal to me, I do not get the hang of it. Anyone knows how to get ...
• 9,863
1k views

### Specify rules for 2D cellular automaton?

If I want my rule to affect cells in this way: dead $\to$ dead $\iff$ Cell has $n$ living neighbours, $n\in A$ dead $\to$ alive$\iff$ Cell has $n$ living neighbours, $n\in B$ alive $\to$ dead $\iff$ ...
• 632
1 vote
79 views

### RulePlot but with integers instead of colors?

I would like to produce something like the output of a RulePlot for a CellularAutomaton, but where the output state is an ...
• 557
129 views

### How to run a CellularAutomaton until a configuration is repeated?

I would like to do something like CellularAutomaton[10, {1, 0, 0, 0, 0}, 2^5], but instead of running for 2^5 steps, it should ...
• 557
130 views

### How to Update a Finite-Width Cellular Automaton

How does one instruct CellularAutomaton to wrap at the edges? (I want a 2d finite-width CA, so it evolves on a torus.) I cannot tell from the docs if this is ...
• 13.8k
259 views

### Improve "Game of Life" on a mosaic

I had the idea of generalizing Conways Game of Life from a regular lattice to act on a Poisson Voronoi mosaic (tessellation). The code below works but is maybe not the best idea in terms of speed. I'...
• 1,005
1 vote
73 views

### Looking for a way to run through every time step of a cellular automaton function with random seeds

I have been creating 2D cellular automaton functions in Mathematica and I would like the output to be a graphical representation of the array at each time step. I know I can do this with ListAnimate: ...
109 views

### Creating a 3D version of the rule 90 cellular automaton

I need help. I want to create a 3D version of the rule 90 cellular automaton, but I don't know how to do it. Please help me. It is for a class in the theory of chaos. this is my code ...
1k views

### Searching for still lifes in Conway's Game of Life

I'm trying to search for still lifes in Conway's Game of Life. An object in Conway's Game of Life can be represented by an array of booleans, say, Array[b, {w, h}]....
• 1,303
1k views

### Approximating Voronoi diagram without any distance checks

When reading the Wikipedia article on Voronoi diagrams I was fascinated by this animation: https://en.wikipedia.org/wiki/Voronoi_diagram#/media/File:Voronoi_growth_euclidean.gif I noticed that to ...
• 675
1k views

### How to calculate CellularAutomaton rule numbers in higher dimensions?

Where can I find documentation of the rule number convention for CellularAutomaton for higher than 1 dimension? I understand the convention for elementary 1D ...
• 1,123
201 views

### Weights in Cellular Automaton

It is not clear for me how are the weights used in the function CellularAutomaton. The code for outer totalistic 1D CA is: \bf{OT}= \sum_{i=0}^{2r(k-1)} \sum_{j=0}^{k-1} k^{k i+j} \phi_{out-tot}(j,...
• 517
906 views

### Custom Cellular Automata rule with k colors

How can I use the CellularAutomaton function to create a 2D automaton using a custom function and k colors? I understood from this post how to use custom rules for 1D automata. I'm trying now to do ...
• 1,018
153 views

### CellularAutomaton's Plot Range

I want to control the plot range of CellularAutomaton to show both left and right sides when using rule 60. Currently I have this: But I want to have something ...
• 379
1 vote