A script to experiment with and visualize elementary cellular automata (command-line or PNG).
This repository stores my first bigger Python project I had worked on (2018, not on GitHub): The monolithic elementary cellular automaton script proudly boasts over 1000 lines of completely unreadable spaghetti code from when I was learning Python.
I even started using Overleaf to write a (not very useful nor comprehensive) 'user manual.'
Run ECAutomaton.py
and directly use the command-line to navigate scripted menus and draw ASCII (Unicode) art, etc.
(Note to self: use cmd
to display all commands (unlike help
))
Customize and generate visualizations in console and PNG.
List of practical 'commands'.
-
info
Information about the script itself! -
links
External resources on the topic! -
examples
Built-in examples. -
image
Save & show last pattern as image. -
print
/print small
/print small2
Print pattern to console. -
preset cells
For how Unicode art is printed. -
randrule
/rr
Randomize rule and print result. -
randseed
/rs
Randomize seed and print result. -
randseed+
/rs+
Advancedly randomize seed and print result. -
rule
Change generation rule/behaviour. -
seed
Change seed generation. -
edges
Change behaviour at cell boundaries (wrap or fixed). -
history
Change imaginary -1st generation (copy of 0th, fixed or custom. -
iterations
How many rows are generated. -
merge
Comparing two different generated patterns. -
order
Toggles the order (first, second). -
shift
linear Shift of iterations for display purposes. -
rule110
Enter 'gliders' (Cook notation). -
rule110 ether
Toggle display of gliders against 'background.' -
funfact
12 fun facts.
These are also built-into the script.
Show all.
Example 8 Example of a 2nd-order, reversible seed (rule 214R)
Example 9 Interesting looking rule with individual compartments (rule 73R)
Example 11 Chaotic rule distantly resembling organic tissue (rule 105R)
Example 12 Rule that turns out to be example 4 but rotated 90 degrees (rule 60R)
Example 17 Pattern with horizontal axis of symmetry (rule 90R)