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 Revisions

2 of 2
added 186 characters in body
Greg Martin
  • 16.7k
  • 4
  • 23
  • 73

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.

Greg Martin
  • 16.7k
  • 4
  • 23
  • 73

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