Ex. 13: 1-D CA in Excel

Implement a one dimensional cellular automata in Excel

- spreadsheet = rows/columns of cells
- cells contain values or formulas
- formula as right hand side of a statement of the form location = expression
- conditional formatting (1=dark, 0=light)
- changing column width, row height
- a cell range is denoted by upperLeftROWCOL:lowerRightROWCOL
- start with a random sequence of eight 1s and 0s in cells M1:T1, “the seed”
- we will fill in the next row (L2:U2); each cell based on its three “parents”
- fill in B2:D8 with 000 to 111; these are all the possible parent patterns
- in cells E2:E8, again, a random sequence of 1s or 0s
- the information in A2:E8 is “the rules”
- focus on L2; it’s parents are K1:M1; find the pattern in the rules and fill in L2 (treat blanks as zero)
- repeat for M2:U2
- but this is tedious; in A2:A8 type 0,…7 to number the rules
- compute rule number for each cell we want to color in row three
- ruleNumber = leftParent*4+centerParent*2+rightParent
- autofill row three cells
- VLOOKUP(ruleNumber, ruleRange, returnValueInColumn)
- autofill row three cells
- auto fill next row
- try changing the rules
- try changing the seed

27 Jun 2018 01:28

Tag Page With: | abstraction | AI/ML | algorithms | big data | binary | complexity | data structures | decomposition | logic | math | models | number systems | pattern recognition | probability