David Squeri CELLULAR AUTOMATON
A cellular automaton is an array of cells that switch on or off depending on whether other cells are on or off. “Rules” are passed in as a number from 0 to 255 The rule’s representation as a 8-digit, binary number determines when cells switch on and off. In my implementation, every new row depends on the row before it. For example: Rule 12 Rule 30 Rule 188 This is the resulting set of rules for Rule=30:
Run my code with: automaton(rule) Run with Rules 30, 129, 137, 150 Rule = 30Rule = 129 Rule = 137Rule = 150