SP1 Exercise 6 | Index << >> |
The obligatory Game of Life. Create the next generation boolean matrix: A 0-cell with 3 neighboring 1-cells becomes a 1. Assume the universe is bordered on all four sides by 0s. See the Dyalog blog http://www.dyalog.com/blog/2017/07/stencil-lives/. life ← {3=s-⍵∧4=s←{+/,⍵}⌺3 3⊢⍵} |