For more details about cellular automata: Wolfram Alpha, Wikipedia, Explanation with code (natureofcode).
This is a simple 1Dimensional cellular automata visualized using matplotlib.pyplot.
-Install matplotlib (To install matplotlib use pip install matplotlib
on your command line)
-Run this file and enter the rule see what is rule
-wait for the output
Note that the initial generation is taken to just have 1 live cell at the center.
- you can change the initial state by manually changing the variable
current
declared in the python file. By default it is set to 499zeros
and only one1
at the center. - my code only thinks about the nearest neighbour (i.e. left and right), maybe you can care about cells which are the neighbour of the nearest neighbours. In that case there will be 232 rules possible, which is equivalent to 4294967296 rules and you can just choose any. Think about how many cool patterns (and other things) you can generate from it.
Here is an example of state 887847937