This is another old pattern I generated with a 1D cellular automaton:

enter image description here

To me it looks like a sword hidden in a waterfall.

The neighborhood of a cell looks like this:

enter image description here

What is the rule behind this pattern?

Find at least one other sword down below and show what it looks like.

Edit The last part of the question doesn't really fit, so I accepted the first answer, stating the rule. I will post the pictures of other 'swords' mysefl to show what I meant. The title of the question can be interpreted figuratively now, only meaning 'find the rule to generate the pattern further'.

Btw, this is what I meant by 'other swords':

enter image description here

  • $\begingroup$ Not sure what you mean by find at least one more sword and show what it looks like. $\endgroup$
    – gtwebb
    Sep 27 '16 at 23:38
  • $\begingroup$ @gtwebb, to find other swords one needs to actually generate this automaton $\endgroup$
    – Yuriy S
    Sep 27 '16 at 23:42
  • $\begingroup$ Do you have a generator you're using? A quick online search and they seem to deal just with 1 generation. $\endgroup$
    – gtwebb
    Sep 27 '16 at 23:51
  • $\begingroup$ @gtwebb, I use a Mathematica program I made. I think it would be more interesting to wait for someone to do it on their own $\endgroup$
    – Yuriy S
    Sep 27 '16 at 23:54
  • 1
    $\begingroup$ IMO the second requirement is more suitable for programming puzzles and code golf but there is enough cross over that I'm sure someone will do it. $\endgroup$
    – gtwebb
    Sep 28 '16 at 0:00

I'm not sure how the rules are written but it seems to be either

2nd generation alive with no first generation


A number of 1st generation alive with no second generation (100,010,001,101,111)


Red is dead


This is based on gtwebb's answer, so please don't treat this as an answer in its own right.

Quick and nasty Microsoft Excel VBA code to generate image:

Sub RunIt()
    Application.ScreenUpdating = False
    Dim r As Long
    Dim c As Long
    Dim cnt As Integer
    Cells.Interior.Color = xlAutomatic
    Cells(2, 8000).Interior.Color = vbRed
    r = 3
    Do While r < 500
        For c = 8000 - r To 8000 + r
            cnt = 0
            If Cells(r - 2, c + 0).Interior.Color = vbRed Then cnt = cnt + 4
            If Cells(r - 1, c - 1).Interior.Color = vbRed Then cnt = cnt + 1
               If Cells(r - 1, c + 0).Interior.Color = vbRed Then cnt = cnt + 2
               If Cells(r - 1, c + 1).Interior.Color = vbRed Then cnt = cnt + 1
               If cnt = 1 Or cnt = 2 Or cnt = 4 Then
                  Cells(r, c).Interior.Color = vbRed
            End If
        r = r + 1
    Cells(1, 8000).Select
    Application.ScreenUpdating = True
End Sub

First 500 iterations (generated while the VBA code was working sideways - the code above has been modified to work downward):

First 500 iterations

  • $\begingroup$ @LukasRotter - Many thanks for the edit Lukas!! :-) $\endgroup$
    – YowE3K
    Sep 28 '16 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.