Questions tagged [cellular-automata]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
81 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 ...
Kopiaobia's user avatar
2 votes
5 answers
470 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 ...
Kopiaobia's user avatar
2 votes
2 answers
244 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 ...
Raphael J.F. Berger's user avatar
1 vote
2 answers
76 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 ...
Najib Idrissi's user avatar
1 vote
2 answers
177 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 ...
Kostas's user avatar
  • 65
1 vote
0 answers
155 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 ...
Kostas's user avatar
  • 65
4 votes
1 answer
85 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? ...
FelipeAmorim's user avatar
0 votes
0 answers
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 ...
Josefin's user avatar
2 votes
1 answer
80 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 ...
bambamfox's user avatar
5 votes
3 answers
251 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 ...
user avatar
2 votes
1 answer
74 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: ...
C.D.'s user avatar
  • 33
5 votes
3 answers
348 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 ...
jbl's user avatar
  • 347
2 votes
0 answers
103 views

Questions on NetMapOperator, NetNestOperator, NetFoldOperator [closed]

I've been playing around with the Higher-Order Network Construction functionality such as NetMapOperator, NetNestOperator, and <...
George Varnavides's user avatar
2 votes
1 answer
158 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 ...
Patrick Stevens's user avatar
3 votes
0 answers
99 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 ...
Joana Bugalho's user avatar
1 vote
1 answer
65 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 ...
AccidentalTaylorExpansion's user avatar
4 votes
2 answers
443 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 ...
liang's user avatar
  • 589
2 votes
1 answer
126 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 ...
Eric's user avatar
  • 23
5 votes
1 answer
415 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 ...
lesobrod's user avatar
  • 1,667
1 vote
1 answer
118 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 ...
thinkingdude's user avatar
2 votes
1 answer
65 views

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

Why does the following work ...
orome's user avatar
  • 12.8k
4 votes
2 answers
543 views

Animating 2D cellular automata with the entire grid in sight

In animating a 2D cellular automata like this: ...
thinkingdude's user avatar
3 votes
3 answers
227 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 . ...
Reda.Kebbaj's user avatar
4 votes
1 answer
99 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: ...
orome's user avatar
  • 12.8k
4 votes
1 answer
172 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 ...
Ivan's user avatar
  • 243
1 vote
1 answer
170 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 ? ...
amir's user avatar
  • 21
2 votes
0 answers
48 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? ...
Delpux's user avatar
  • 41
1 vote
0 answers
41 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 ...
Jon's user avatar
  • 31
2 votes
1 answer
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 ...
Jon's user avatar
  • 31
2 votes
2 answers
79 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?
George's user avatar
  • 3,145
4 votes
1 answer
166 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: ...
OkkesDulgerci's user avatar
3 votes
1 answer
611 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 ...
Wuyang Zhang 's user avatar
0 votes
1 answer
205 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 ...
user305883's user avatar
12 votes
1 answer
924 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 ...
Αλέξανδρος Ζεγγ's user avatar
9 votes
2 answers
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$ ...
Vepir's user avatar
  • 622
1 vote
1 answer
75 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 ...
theQman's user avatar
  • 547
6 votes
2 answers
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 ...
theQman's user avatar
  • 547
3 votes
2 answers
123 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 ...
Alan's user avatar
  • 13.7k
6 votes
2 answers
257 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'...
JHT's user avatar
  • 1,005
1 vote
0 answers
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: ...
Emma Kuntz's user avatar
0 votes
0 answers
107 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 ...
Carlos Francisco Flores Paez's user avatar
38 votes
1 answer
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}]....
alephalpha's user avatar
  • 1,293
9 votes
3 answers
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 ...
Yuriy S's user avatar
  • 675
11 votes
2 answers
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 ...
Mark S.'s user avatar
  • 1,123
2 votes
0 answers
198 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,...
Gluoncito's user avatar
  • 517
4 votes
2 answers
890 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 ...
xtian777x's user avatar
  • 1,018
5 votes
2 answers
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 ...
xtt's user avatar
  • 379
1 vote
0 answers
95 views

Generalization of DiscreteMarkovProcess?

I am trying to create a Markov chain using the initial state of a probabilistic cellular automaton, that is a list of length 8, as the first argument of the function ...
Lame-Ov2.0's user avatar
11 votes
3 answers
897 views

Converting Game of Life images to lists

I want to convert images of GoL configurations into binary matrices to run in Mathematica's CellularAutomaton. I know that there's a collection of GoL patterns in ...
andandandand's user avatar
  • 2,393
15 votes
1 answer
543 views

Implementing the Biham–Middleton–Levine traffic model as CellularAutomaton

In an attempt to understand how to make rules for CellularAutomaton[], I set out to try to implement the Biham–Middleton–Levine traffic model. It is a 2D, ...
HJensen's user avatar
  • 537