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, is it possible to implement a board as closed torus with CellularAutomaton
options?
Next, there is a simple scheme: N states(colors), 8 neighbors. The cell changes the state to the most common among neighbours.
If there are several of these with the same weight, then at random one of them is chosen.
Can this be realized with CellularAutomaton
?
Finally, an additional question for those familiar with the topic. I implemented such process on a pure core language, and see that it always leads to stationary a picture like a political map.
Is such a result already known and can it be proved that the process always ends in a static state?
ArrayPlot /@ CellularAutomaton[{2, 2, {1, 1}}, {{0, 0, 0}, {0, 0, 0}, {0, 0, 1}}, 10]
– the cellular automaton here moves a black square diagonally up-left. Second, I am not sure why you want to useCellularAutomaton
if you already have your implementation :) And lastly, perhaps it would help if you post your code. $\endgroup$ListConvolve
orPartition
, two functions commonly used to implement CAs. It is supported byArrayPad
which could be used to make one's own implementation of such a CA, but as you already have the code I guess this observation is not very helpful. $\endgroup$CellularAutomata
will compute a fixed background by repeating some given elements. Consider a list{1, 2, 3, 4, 5}
. What OP wants is that the neighborhood for the last element should be{4, 5, 1}
in the first iteration. In the next iteration, perhaps the list is{6, 7, 8, 9, 10}
. Then the neighborhood should be{9, 10, 6}
. This is something different than creating a background consisting of a cyclically repeated list of fixed values. $\endgroup$