ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Non-totalistic hex rules

For discussion of other cellular automata.

Non-totalistic hex rules

Postby _zM » September 29th, 2017, 4:27 pm

It recently occurred to me that the notation described here for hex rules like the mentioned B2o/S2m34 could be extended easily to cover all other non-totalistic isotropic transitions, even without adding any more letters:
Image
This can then be used like a version of Hensel notation, but for hex rules instead. For example:
In the rule B2-p/S2-m4H cells behave as follows:
  • OFF cells with two neighbors which aren't directly opposite turn ON.
  • ON cells with two neighbors which are either adjacent or opposite of each other stay ON.
  • ON cells with four neighbors stay ON.
  • All other cells stay or turn OFF.
This rule turns out to be interesting, as it contains a very common puffer and spaceship which interact in interesting ways, resulting in explosive behavior.

An example pattern:
x = 2, y = 2, rule = B2-p_S2-m4H
o$2o!


The rule file:
@RULE B2-p_S2-m4H

@TABLE
n_states:2
neighborhood:hexagonal
symmetries:rotate6reflect

var a = {0,1}
var b = a
var c = a
var d = a
var e = a
var f = a
var g = a

0,1,1,0,0,0,0,1
0,1,0,1,0,0,0,1

1,1,1,0,0,0,0,1
1,1,0,0,1,0,0,1
1,1,1,1,1,0,0,1
1,1,1,1,0,1,0,1
1,1,1,0,1,1,0,1

a,b,c,d,e,f,g,0


And the script which generated the rule file (now runs in Golly):
import golly as g

def translateRule(string):

   if "_" in string:
      birth,survival = string.split("_")
   else:
      birth = string
      survival = ""

   #expand strings
   longbirth = []
   longsurvival = []

   for i in range(len(birth)):
      if birth[i] in "0156":
         longbirth.append(birth[i])
      elif birth[i] in "234":
         cond = []
         negativeMode = False
         for j in birth[i+1:]:
            if j in "B0123456H":
               break
            elif j == "-":
               negativeMode = True
               cond += ["o","m","p"]
            elif negativeMode:
               cond.remove(j)
            else:
               cond.append(j)

         if cond == []:
            cond = ["o","m","p"]

         for k in cond:
            longbirth.append(birth[i] + k)
      else:
         pass

   for i in range(len(survival)):
      if survival[i] in "0156":
         longsurvival.append(survival[i])

      elif survival[i] in "234":
         cond = []
         negativeMode = False

         for j in survival[i+1:]:
            if j in "S0123456H":
               break

            elif j == "-":
               negativeMode = True
               cond += ["o","m","p"]

            elif negativeMode:
               cond.remove(j)
            else:
               cond.append(j)

         if cond == []:
            cond = ["o","m","p"]

         for k in cond:
            longsurvival.append(survival[i] + k)
      else:
         pass

   return longbirth, longsurvival

def assembleRule(original,(longbirth,longsurvival)):

   rules = {
      "0" :",0,0,0,0,0,0,",
      "1" :",1,0,0,0,0,0,",
      "2o":",1,1,0,0,0,0,",
      "2m":",1,0,1,0,0,0,",
      "2p":",1,0,0,1,0,0,",
      "3o":",1,1,1,0,0,0,",
      "3m":",1,1,0,1,0,0,",
      "3p":",1,0,1,0,1,0,",
      "4o":",1,1,1,1,0,0,",
      "4m":",1,1,1,0,1,0,",
      "4p":",1,1,0,1,1,0,",
      "5" :",1,1,1,1,1,0,",
      "6" :",1,1,1,1,1,1,",
   }

   rule = """@RULE {rule}

@TABLE
n_states:2
neighborhood:hexagonal
symmetries:rotate6reflect

var a = {{0,1}}
var b = a
var c = a
var d = a
var e = a
var f = a
var g = a

""".format(rule=original)

   for line in longbirth:

      rule += "0"
      rule += rules[line]
      rule += "1\n"

   rule += "\n"

   for line in longsurvival:

      rule += "1"
      rule += rules[line]
      rule += "1\n"

   rule += "\na,b,c,d,e,f,g,0"

   return rule

def main():
   converted = g.getstring("Which rule file do you want to be created? ").replace("/","_")
   #print(assembleRule(converted,translateRule(converted)))
   file = open(g.getdir("rules") + converted + ".rule", "w")
   file.write(assembleRule(converted,translateRule(converted)))
   file.close()
   g.setrule(converted)

#if __name__ == '__main__':
#   main()
main()

What do you think?
Last edited by _zM on December 1st, 2018, 6:47 pm, edited 1 time in total.
Creator of multiple rules that may or may not be what you'd expect
User avatar
_zM
 
Posts: 171
Joined: June 26th, 2016, 3:07 pm

Re: Non-totalistic hex rules

Postby _zM » September 29th, 2017, 5:16 pm

B2o3m/S2H:
@RULE B2o3m_S2H

@TABLE
n_states:2
neighborhood:hexagonal
symmetries:rotate6reflect

var a = {0,1}
var b = a
var c = a
var d = a
var e = a
var f = a
var g = a

0,1,1,0,0,0,0,1
0,1,1,0,1,0,0,1

1,1,1,0,0,0,0,1
1,1,0,1,0,0,0,1
1,1,0,0,1,0,0,1

a,b,c,d,e,f,g,0


This rule seems to be chaotic, but not explosive. A good example is the pentahex which resembles the R-penomino, lasting for 520 generations.
x = 3, y = 3, rule = B2o3m_S2H
2bo$3o$bo!
Last edited by _zM on September 30th, 2017, 4:26 am, edited 2 times in total.
Creator of multiple rules that may or may not be what you'd expect
User avatar
_zM
 
Posts: 171
Joined: June 26th, 2016, 3:07 pm

Re: Non-totalistic hex rules

Postby Apple Bottom » September 29th, 2017, 6:37 pm

_zM wrote:It recently occurred to me that the notation described here for hex rules like the mentioned B2o/S2m34 could be extended easily to cover all other non-totalistic isotropic transitions, even without adding any more letters:

[...]

What do you think?


I think that this is proof that good ideas tend to be had by more than one person. ;) This notation already exists, see e.g. the wiki.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm

Re: Non-totalistic hex rules

Postby drc » September 29th, 2017, 6:47 pm

B2-p/S2-m5 is sufficiently interesting. It has this cool p19 failed replicator that turns into two puffers:
x = 4, y = 3, rule = B2-p_S2-m5
o$2bo$2b2o!

It can be hassled by 2-cell oscillators at period 76:
x = 26, y = 25, rule = B2-p_S2-m5
9bo2$o9bo$o5$14bo$15b2o$13bo2bo$15bo10$25bo$15bo9bo2$16bo!

It also has a spaceship that forms from the pre-pre-beehive (which is another failed replicator), and a relative that travels at the same speed:
x = 45, y = 26, rule = B2-p_S2-m5
10bobo$11b2o$12bo2$13bo$10b2o4b2o7$14bo5bo$16bo2bo4$18b4o2$40b2o3$22bo
19bo$o20bo2bo16bo2bo$2o21bo19bo$bo21b2o18b2o!

There's a p11 that looks like its period:
x = 3, y = 3, rule = B2-p_S2-m5
obo$obo$obo!

9-cell breeder, although 8 cells is probably all that's needed:
x = 6, y = 11, rule = B2-p_S2-m5
3bo2$4bo$4b2o$5bo4$o$2o$bo!

If we can create a flyby with a bigship and a p2 that creates another bigship, we may have a gun! That or rubbing the p76s' against eachother. Here's the best flyby I have:
x = 16, y = 40, rule = B2-p_S2-m5
obo$b2o$2bo2$3bo$2o4b2o7$4bo5bo$6bo2bo4$8b4o5$12bo$11bo2bo$13bo$13b2o
13$13bo$15bo!
This post was brought to you by the letter D, for dishes that Andrew J. Wade won't do. (Also Daniel, which happens to be me.)
Current rule interest: B2ce3-ir4a5y/S2-c3-y
User avatar
drc
 
Posts: 1664
Joined: December 3rd, 2015, 4:11 pm
Location: creating useless things in OCA

Re: Non-totalistic hex rules

Postby _zM » September 30th, 2017, 2:49 am

Apple Bottom wrote:I think that this is proof that good ideas tend to be had by more than one person. ;) This notation already exists, see e.g. the wiki.

Oh, I didn't know that. Pretty nice rulespace regardless, especially considering that there are barely any (if any) interesting/Class 4 rules in the standard hexagonal rulespace, while this has multiple rules with decently complicated dynamics.
Creator of multiple rules that may or may not be what you'd expect
User avatar
_zM
 
Posts: 171
Joined: June 26th, 2016, 3:07 pm

Re: Non-totalistic hex rules

Postby strake » April 19th, 2018, 4:31 pm

I discovered an interesting rule, B2o45/S2o45 a few years ago. Gliders and simple oscillators are extremely common; still lifes are quite uncommon (but possible).
strake
 
Posts: 26
Joined: October 8th, 2014, 7:47 am
Location: Mountain View, California

Re: Non-totalistic hex rules

Postby Saka » April 20th, 2018, 8:20 am

Well this is cool
x = 75, y = 84, rule = B2o3o_S2o3o4op
bo3bo$3bob2o$2bobob2o$3bo2b2o$7bo$4b2obo35bo$4bo3bo36bo$5bo42b3o$5b2o
3bo35bo2b3o$7bo37bo2bo2bo$9b3o39b2o2$48b4o$48bo2b2o$52bo$52bo21$23bo9b
o$25bo6bo$27bo3bo32b2o$29b2o$30bo$61bo$31bo2$bo30bo37bo$4obo66bo$bobob
o27bo34bo3b2o$b2o6bo59b3ob2o$2b4o2b2o61b4o$3b3o67bo$5b4o34b2o$10bo31bo
2bo$45b2o23$34bo28bo$35bo26bobo$32bo2bo27b3o2b2o$33bo4bo25b2obo3bo$32b
o4bo27bobo4bo$31b3obobo29bo$32bo2b3o29b3o$32b6o30b3o$34b3o!


REALLY WEIRD chaotic replicator made of 2 oscs. Clean up please?
x = 43, y = 43, rule = B2o3o4o_S2o3op46
b2o5b2o$2o8b2o$b2o7b2o$bo10bo$2bo3b3o3bo$7b2o$8bo4$8bobobo$9b4o$11bo
18$31b2o5b2o$30b2o8b2o$31b2o7b2o$31bo10bo$32bo3b3o3bo$37b2o$38bo4$38bo
bobo$39b4o$41bo!
If you're the person that uploaded to Sakagolue illegally, please PM me.
x = 17, y = 10, rule = B3/S23
b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5b
o2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo!

(Check gen 2)
User avatar
Saka
 
Posts: 3005
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X

Re: Non-totalistic hex rules

Postby toroidalet » April 20th, 2018, 11:03 am

chaotic replicator-based (20,20)c/412 ship (hexagonal speed):
x = 98, y = 105, rule = B2o3o4o_S2o3op46
26b2o5b2o21b2o5b2o$25b2o8b2o18b2o8b2o$26b2o7b2o19b2o7b2o$26bo10bo18bo
10bo$27bo3b3o3bo19bo3b3o3bo$32b2o28b2o$33bo29bo4$33bobobo25bobobo$34b
4o26b4o$36bo29bo18$86b2o5b2o$85b2o8b2o$86b2o7b2o$86bo10bo$87bo3b3o3bo$
92b2o$93bo4$93bobobo$94b4o$96bo18$86b2o5b2o$33bo51b2o8b2o$32b4o50b2o7b
2o$33b3o50bo10bo$o29bo3b2o3bo29bo17bo3b3o3bo$o34bo34bo21b2o$5b2o24bo8b
o24b2o26bo$5b3o24bobo3bobo24b3o$5b4o24b2o4b2o24b4o$6b3o57b3o$26b3o18b
3o43bobobo$25bo2b2o17b2o2bo42b4o$16bo8bob3o2bo12bo2b3obo8bo34bo$16bo9b
2o2b2o15b2o2b2o9bo$22b2o2b2o3bo16bo3b2o2b2o$24b2o6b2o13b2o6b2o$23b2ob
2o4b3o12b3o4b2ob2o$25bob2ob3obo13bob3ob2obo$26bobob2o2bo14bo2b2obobo$
27bobo2b2o17b2o2bobo$21b2o5b2o26b2o5b2o$22b2o4bobo25bobo4b2o$22b3o5bo
26bo5b3o$24bo39bo5$31b2o28b2o8$35b2o28b2o$35b3o27b3o$35b4o26b4o$36b3o
27b3o5$39b2o28b2o!

(10,10)c/294 (hexagonal speed) ship:
x = 11, y = 52, rule = B2o3o4o_S2o3op46
o9$8b3o$o8b2o$10bo29$o9$8b3o$o8b2o$10bo!
x = 11, y = 5, rule = B2ck3-ij5n78/S01e2ei3-k5ai
8b2o$2o3b2o$bo4bo3bo$2bo2b2o$o7bo!

(Check Gen 2)
User avatar
toroidalet
 
Posts: 963
Joined: August 7th, 2016, 1:48 pm
Location: my computer

Re: Non-totalistic hex rules

Postby _zM » December 1st, 2018, 6:09 pm

This rulespace is now supported by apgsearch/Catagolue You can now use apgsearch 4.x to upload hauls from this rulespace to Catagolue. Example hauls have already been uploaded.
Last edited by _zM on December 1st, 2018, 6:34 pm, edited 1 time in total.
Creator of multiple rules that may or may not be what you'd expect
User avatar
_zM
 
Posts: 171
Joined: June 26th, 2016, 3:07 pm

Re: Non-totalistic hex rules

Postby calcyman » December 1st, 2018, 6:27 pm

_zM wrote:This rulespace is now supported by apgsearch/Catagolue. Example hauls have already been uploaded.


That statement is half-correct. Currently the /hashsoup links give you the wrong output (you need to reflect them to get the correct orientation).

And of course, some of the symmetries are meaningless for hexagonal rules; I should really add new symmetries:

  • C3_1
  • C3_3
  • C6
  • D6_1
  • D6_3
  • D12

and properly adapt the D2, C2, and D4 (ouch!) classes of symmetries for hexagonal rules.

So for the moment I've disabled all of the non-C1 symmetries for hexagonal rules, and will think hard about what the other symmetries should be.
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 2058
Joined: June 1st, 2009, 4:32 pm

Re: Non-totalistic hex rules

Postby Apple Bottom » December 2nd, 2018, 3:55 pm

calcyman wrote:
_zM wrote:This rulespace is now supported by apgsearch/Catagolue. Example hauls have already been uploaded.


That statement is half-correct. [...]


Half-correct even, this is excellent! However, it's not just /hashsoup that's broken; Catagolue also does not believe that the apgcodes produced are in fact correct for these rules, instead stating that "[t]he apgcode prefix does not accurately reflect the behaviour of the pattern encoded in the suffix under the specified rule. As such, the provided apgcode is invalid in this rule".
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm

Re: Non-totalistic hex rules

Postby calcyman » December 3rd, 2018, 9:40 am

Apple Bottom wrote:Half-correct even, this is excellent! However, it's not just /hashsoup that's broken; Catagolue also does not believe that the apgcodes produced are in fact correct for these rules, instead stating that "[t]he apgcode prefix does not accurately reflect the behaviour of the pattern encoded in the suffix under the specified rule. As such, the provided apgcode is invalid in this rule".


Thanks -- I've amended hashsoup, SVGs, and object pages. For 2-state outer-totalistic rules, the LifeViewers on the object pages work as desired:

https://catagolue.appspot.com/object/xp48_76h/b2s34h
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 2058
Joined: June 1st, 2009, 4:32 pm

Re: Non-totalistic hex rules

Postby muzik » December 3rd, 2018, 9:50 am

There's also the issue that along with not being animated, the svgs are shown using a square grid while lifeviewer shows them using an offset square grid to simulate a hexagonal grid; I'd say this is a minor issue.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Non-totalistic hex rules

Postby muzik » December 5th, 2018, 5:27 am

This spaceship seems to have some sort of gutter symmetry:

x = 7, y = 5, rule = B2o/S2m34H
6bo$bob4o$b2obobo$bobob2o$4o!


Might be worth including this in the batch of planned symmetries for hex apgsearch.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Non-totalistic hex rules

Postby Saka » December 5th, 2018, 5:55 am

muzik wrote:This spaceship seems to have some sort of gutter symmetry:

x = 7, y = 5, rule = B2o/S2m34H
6bo$bob4o$b2obobo$bobob2o$4o!


Might be worth including this in the batch of planned symmetries for hex apgsearch.

The other possible variants
x = 22, y = 22, rule = B2o_S2m34H
6bo$bob4o$b2obobo$bobob2o$4o$21bo$18b4o$19bobo$18bob2o$18b2o$18bobo$
17b4o5$11bo$8b4o$7bobobo$7b2ob2o$7bobo$6b4o!
If you're the person that uploaded to Sakagolue illegally, please PM me.
x = 17, y = 10, rule = B3/S23
b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5b
o2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo!

(Check gen 2)
User avatar
Saka
 
Posts: 3005
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X


Return to Other Cellular Automata

Who is online

Users browsing this forum: No registered users and 3 guests