Skip to content

mikako-shirai/Elementary-Cellular-Automaton-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Elementary Cellular Automaton Generator

Simple code that generates patterns of elementary cellular automaton using Python.

To run the code

  1. move to the directory you want to create outputs in
$ cd [PATH]
  1. clone this repository
$ git clone https://github.com/mikako-shirai/Elementary-Cellular-Automaton-Generator.git
  1. run the python file
$ python3 main.py

After running the file

By running main.py, it reads the following three inputs from command line

  • a decimal number
  • a number of rows in the output (optional, default value = 200)
  • a number of columns in the output (optional, default value = 400)

on command line :

rule number (0-255) : [YOUR INPUT] (example : 110)
number of row (hit enter to skip) : 
number of column (hit enter to skip) : 

After converting the first input to a binary number, it creates a text file of the pattern consisting of 0s (as white cells) and 1s (as black cells) in the directory you are currently in

rule_110.txt
main.py

Examples of outputs

Rule 90

Rule 90

Rule 99

Rule 99

Rule 110

Rule 110

Rule 150

Rule 150

About

A simple Elementary Cellular Automaton pattern generator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages