One-dimensional cellular automata: Difference between revisions
Content deleted Content added
→{{header|Perl 6}}: generalization to any cellular automata of this kind |
m →{{header|Perl 6}}: precisions about the choice of the rule number. |
||
Line 2,360: | Line 2,360: | ||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
We'll make a general algorithm capable of computing any cellular automata as defined by Stephen Wolfram's famous book [[wp:A new kind of Science|A new kind of Science]]. |
We'll make a general algorithm capable of computing any cellular automata as defined by Stephen Wolfram's famous book [[wp:A new kind of Science|A new kind of Science]]. The rule currently proposed for this task is rule 0b01101000 = 104 but it is not particularly interesting so instead we'll show the automata defined by rule n°90, which shows a [[wp:Sierpinski Triangle|Sierpinski Triangle]]-like figure. |
||
<lang perl6>class Automata { |
<lang perl6>class Automata { |