Created
August 31, 2011 10:13
-
-
Save moxuse/1183235 to your computer and use it in GitHub Desktop.
Cellular Automaton
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
Task({ | |
var array,rules; | |
array = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa"; | |
rules = [[//rule "Chell" | |
"a>a>a" -> "x", | |
"a>a>x" -> "a", | |
"a>x>a" -> "x", | |
"a>x>x" -> "a", | |
"x>a>a" -> "a", | |
"x>a>x" -> "a", | |
"x>x>a" -> "a", | |
"x>x>x" -> "x", | |
],[//rule 30 | |
"a>a>a" -> "x", | |
"a>a>x" -> "x", | |
"a>x>a" -> "x", | |
"a>x>x" -> "a", | |
"x>a>a" -> "a", | |
"x>a>x" -> "a", | |
"x>x>a" -> "a", | |
"x>x>x" -> "x", | |
],[//rule 90 | |
"a>a>a" -> "x", | |
"a>a>x" -> "a", | |
"a>x>a" -> "x", | |
"a>x>x" -> "a", | |
"x>a>a" -> "a", | |
"x>a>x" -> "x", | |
"x>x>a" -> "a", | |
"x>x>x" -> "x", | |
]].choose; | |
62.do({ | |
array=array.rewriteString(rules).keep(32).postln ; | |
}); | |
}).play | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment