Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 186 characters in body
Source Link
Greg Martin
  • 16.7k
  • 4
  • 23
  • 73

Wolfram Language (Mathematica), 8271 bytes

StringRiffle[StringJoin/@(CellularAutomaton[30StringRiffle[CellularAutomaton[30,{{1},0},31]/.{1->"1",0->"."}),"\n"]"\n",""]

Try it online! Try it online! A code snippet that produces a string.

Gotta have the OG in the house. Note the 30 in this code is precisely why this cellular automaton is called Rule 30! See the CellularAutomaton documentation for how it encodes the rule of evolution.

Wolfram Language (Mathematica), 82 bytes

StringRiffle[StringJoin/@(CellularAutomaton[30,{{1},0},31]/.{1->"1",0->"."}),"\n"]

Try it online! Gotta have the OG in the house. Note the 30 in this code is precisely why this cellular automaton is called Rule 30!

Wolfram Language (Mathematica), 71 bytes

StringRiffle[CellularAutomaton[30,{{1},0},31]/.{1->"1",0->"."},"\n",""]

Try it online! A code snippet that produces a string.

Gotta have the OG in the house. Note the 30 in this code is precisely why this cellular automaton is called Rule 30! See the CellularAutomaton documentation for how it encodes the rule of evolution.

Source Link
Greg Martin
  • 16.7k
  • 4
  • 23
  • 73

Wolfram Language (Mathematica), 82 bytes

StringRiffle[StringJoin/@(CellularAutomaton[30,{{1},0},31]/.{1->"1",0->"."}),"\n"]

Try it online! Gotta have the OG in the house. Note the 30 in this code is precisely why this cellular automaton is called Rule 30!

AltStyle によって変換されたページ (->オリジナル) /