[HN Gopher] Show HN: Create your own cellular automata
       ___________________________________________________________________
        
       Show HN: Create your own cellular automata
        
       Author : Aperocky
       Score  : 60 points
       Date   : 2021-03-15 14:11 UTC (8 hours ago)
        
 (HTM) web link (aperocky.com)
 (TXT) w3m dump (aperocky.com)
        
       | derg wrote:
       | Cellular Automata are so cool. I did a project for a distributed
       | computing course on them and it was real fun throwing different
       | rules in and seeing what emerged.
        
       | ninly wrote:
       | A couple years ago I threw together some MATLAB functions to take
       | a wolfram number and a seed row, along with some cosmetic
       | parameters, to generate elementary cellular automata. Nothing
       | very big or elaborate, but fun and handy for exploring the ECAs
       | themselves.
       | 
       | https://github.com/ninly/ecafun
        
       | mikkom wrote:
       | I created something a little more complicated some time ago..
       | 
       | http://kirkas.com/genesys/
       | 
       | Some more information
       | 
       | https://www.reddit.com/r/alife/comments/giyjaa/show_ralife_g...
       | 
       | https://www.reddit.com/r/alife/comments/ger9r4/show_ralife_s...
        
         | Aperocky wrote:
         | This is amazing, though I have to say it is also pretty
         | confusing.
         | 
         | What does the color represent? Does the creature stack?
        
       | dash2 wrote:
       | Question: what proportion of cellular automata generate
       | "interesting" patterns in the way Conway's Game of Life does? For
       | instance, in the GOL, you can create gliders, which keep their
       | pattern over time, and even build logic gates. Perhaps you could
       | even have "life forms" in some sense?
       | 
       | Presumably many automata aren't like this and just generate
       | uninteresting patterns, or always collapse into some determinate
       | after enough time.
       | 
       | What do we know about this?
        
         | Aperocky wrote:
         | It doesn't even necessarily need to be dynamic, for instance,
         | use this to generate a maze:                 {         "0": [
         | "SpontaneousChange 1 0.1"         ],         "1": [
         | "CountAdjacent gt 1 5 2"         ],         "2": [],
         | "colorMap": {           "0": "tintblack",           "1":
         | "cyan",           "2": "gray"         }       }
        
         | mysterydip wrote:
         | The wikipedia page actually has a lot of depth on this topic,
         | with other rulesets as well (see "specific rules" at the
         | bottom): https://en.m.wikipedia.org/wiki/Cellular_automaton
        
       | Aperocky wrote:
       | Express your own cellular automata without writing 100s of lines
       | of boiler plate.
       | 
       | The famous conway game of life can be expressed as:
       | 
       | ``` { "InitialCondition": "1 0.2", "0": [ "CountAdjacent eq 1 3
       | 1" ], "1": [ "CountAdjacent lt 1 2 0", "CountAdjacent gt 1 3 0" ]
       | } ```
       | 
       | Entirely browser based.
        
         | [deleted]
        
       | SamBam wrote:
       | Nice. It's fun the be able to play with the initial "forest fire"
       | model and try to model different conditions -- a wet forest which
       | takes more adjacent sparks to create a fire, a fire that stays
       | burning longer, etc.
       | 
       | A couple small suggestions from someone who makes a lot of these
       | kinds of models: A "Step" button would be really nice, to be able
       | to advance the model a single step at a time; it would be helpful
       | for "Start" to change to "Reset" or "Restart" after the initial
       | press, so you're not surprised when it blows away your model;
       | "Continue" could be disabled until you Stop, as it doesn't do
       | anything.
        
         | Aperocky wrote:
         | Thanks for the feedback! The continue was actually a bug as it
         | allowed multiple settimeout loops to speed up the process.
         | 
         | Hammered out a fix and added the step button over lunch break,
         | pretty easy change & fix (just 10 lines!). thanks for
         | suggestion.
        
       | [deleted]
        
       | beforeolives wrote:
       | Can anyone share some insight into why cellular automata are a
       | big deal? I've built the original Game of Life and some
       | variations (in 3D, 4D and on a hexagonal grid) during last year's
       | Advent of Code but I still don't get the usefulness or where they
       | fit in the larger picture of computer science.
        
         | macintux wrote:
         | I've struggled with this question as well, although Wolfram's
         | tribute to Solomon Golomb (recently reposted here) helped me
         | start to see why they're interesting.
         | 
         | https://writings.stephenwolfram.com/2016/05/solomon-golomb-1...
        
         | yiyus wrote:
         | Cellular automata models are widely used in different science
         | and engineering disciplines. For example, I use them for the
         | simulation of heat treatments of steel.
         | 
         | I guess that the fascination of the CS community comes from: 1)
         | Conway; 2) They raise different interesting programming
         | questions and exercises (writing GOL is a nice exercise to
         | learn a new language, a parallel CA is a nice way to learn
         | about parallelization, huge models pose interesting memory
         | management questions,...); and 3) They are cool (isn't the
         | video about GOL in APL by John Scholes one of the coolest
         | programming videos you've ever seen?)
        
         | h2odragon wrote:
         | They're useful for making pretty patterns; digital lava lamp
         | equivalents. Others mentioned other good reasons; so I'll throw
         | that one in for completeness.
        
         | A12-B wrote:
         | I'm sure there's a better reason, but I honestly think a major
         | factor for why people think this stuff is important is because
         | Conway called it 'the game of life', and it was a pretty early
         | discovery in computer science. It was basically a recipe for
         | sci-fi imagination and headlines, leading some people to
         | believe this is literally a program about generating cellular
         | life.
        
         | MattConfluence wrote:
         | I'd say it's not a very useful model on it's own, but it's a
         | great teaching tool that illustrates emergence [1] well. It's
         | easy to get started and it gets you into a mindset that you can
         | then bring along to other models that you might do something
         | slightly more useful with.
         | 
         | [1] https://en.wikipedia.org/wiki/Emergence
        
       | sequoia wrote:
       | Reminds me of this one https://ncase.me/sim/
        
       | thedanbob wrote:
       | When I was in college I had a job working for a physics professor
       | who was studying cellular computation. The hope was that by
       | studying examples in nature of cellular systems that solved
       | particular problems (e.g. a leaf trying to maximize sunlight
       | absorption while minimizing water loss) we would be able to solve
       | similar problems in the artificial realm. Using his equations I
       | created a cellular automata simulation in Excel with VBA, my
       | first real programming outside of CS classes. Good times.
        
         | Aperocky wrote:
         | Now that's dedication, I can't imagine doing the same with
         | Excel (though it's definitely possible).
         | 
         | I've never tried this but what does coding in excel feels like?
         | Does it feel like an ancient version of scratch?
        
       | nynx wrote:
       | Wolfram has produced a number of interesting articles, as well as
       | a book, that explore the meta-landscape of cellular automata.
        
         | webmaven wrote:
         | More recently, he's been exploring the application of cellular-
         | automata-like rules to more general graphs (ie. nodes and
         | edges) rather than the classic grids of cells:
         | https://www.wolframphysics.org/technical-introduction/
        
       ___________________________________________________________________
       (page generated 2021-03-15 23:01 UTC)