Page 1 of 1

Non-totalistic hex rules

Posted: September 29th, 2017, 4:27 pm
by _zM
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:

Code: Select all

x = 2, y = 2, rule = B2-p_S2-m4H
o$2o!
The rule file:

Code: Select all

@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):

Code: Select all

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?

Re: Non-totalistic hex rules

Posted: September 29th, 2017, 5:16 pm
by _zM
B2o3m/S2H:

Code: Select all

@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.

Code: Select all

x = 3, y = 3, rule = B2o3m_S2H
2bo$3o$bo!

Re: Non-totalistic hex rules

Posted: September 29th, 2017, 6:37 pm
by Apple Bottom
_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.

Re: Non-totalistic hex rules

Posted: September 29th, 2017, 6:47 pm
by drc
B2-p/S2-m5 is sufficiently interesting. It has this cool p19 failed replicator that turns into two puffers:

Code: Select all

x = 4, y = 3, rule = B2-p_S2-m5
o$2bo$2b2o!
It can be hassled by 2-cell oscillators at period 76:

Code: Select all

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:

Code: Select all

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:

Code: Select all

x = 3, y = 3, rule = B2-p_S2-m5
obo$obo$obo!
9-cell breeder, although 8 cells is probably all that's needed:

Code: Select all

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:

Code: Select all

x = 16, y = 40, rule = B2-p_S2-m5
obo$b2o$2bo2$3bo$2o4b2o7$4bo5bo$6bo2bo4$8b4o5$12bo$11bo2bo$13bo$13b2o
13$13bo$15bo!

Re: Non-totalistic hex rules

Posted: September 30th, 2017, 2:49 am
by _zM
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.

Re: Non-totalistic hex rules

Posted: April 19th, 2018, 4:31 pm
by strake
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).

Re: Non-totalistic hex rules

Posted: April 20th, 2018, 8:20 am
by Saka
Well this is cool

Code: Select all

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?

Code: Select all

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!

Re: Non-totalistic hex rules

Posted: April 20th, 2018, 11:03 am
by toroidalet
chaotic replicator-based (20,20)c/412 ship (hexagonal speed):

Code: Select all

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:

Code: Select all

x = 11, y = 52, rule = B2o3o4o_S2o3op46
o9$8b3o$o8b2o$10bo29$o9$8b3o$o8b2o$10bo!

Re: Non-totalistic hex rules

Posted: December 1st, 2018, 6:09 pm
by _zM
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.

Re: Non-totalistic hex rules

Posted: December 1st, 2018, 6:27 pm
by calcyman
_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.

Re: Non-totalistic hex rules

Posted: December 2nd, 2018, 3:55 pm
by Apple Bottom
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".

Re: Non-totalistic hex rules

Posted: December 3rd, 2018, 9:40 am
by calcyman
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

Re: Non-totalistic hex rules

Posted: December 3rd, 2018, 9:50 am
by muzik
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.

Re: Non-totalistic hex rules

Posted: December 5th, 2018, 5:27 am
by muzik
This spaceship seems to have some sort of gutter symmetry:

Code: Select all

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.

Re: Non-totalistic hex rules

Posted: December 5th, 2018, 5:55 am
by Saka
muzik wrote:This spaceship seems to have some sort of gutter symmetry:

Code: Select all

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

Code: Select all

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!

Re: Non-totalistic hex rules

Posted: July 27th, 2020, 7:15 am
by muzik
Interesting nt hex patterns, only one of which were found by me:

Code: Select all

x = 48, y = 9, rule = B2o3o4m5/S2H
bo19bo19bo$3o17b3o17b3o3$46bo$41bo4bo$41b2o3b2o$24b3o16bo$25bo!

Code: Select all

x = 4, y = 4, rule = B2o3op4m5/S13m4p6H
2bo$bobo$o2bo$b2o!

Code: Select all

x = 4, y = 3, rule = B2o3o4m5/S2H
4o$b3o$b2o!

Re: Non-totalistic hex rules

Posted: July 27th, 2020, 7:49 am
by muzik
Quoting these posts for lifeviewer compatibility purposes:
drc wrote:
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:

Code: Select all

x = 4, y = 3, rule = B2-p_S2-m5H
o$2bo$2b2o!
It can be hassled by 2-cell oscillators at period 76:

Code: Select all

x = 26, y = 25, rule = B2-p_S2-m5H
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:

Code: Select all

x = 45, y = 26, rule = B2-p_S2-m5H
10bobo$11b2o$12bo2$13bo$10b2o4b2o7$14bo5bo$16bo2bo4$18b4o2$40b2o3$22bo
19bo$o20bo2bo16bo2bo$2o21bo19bo$bo21b2o18b2o!
There's a p11 that looks like its period:

Code: Select all

x = 3, y = 3, rule = B2-p_S2-m5H
obo$obo$obo!
9-cell breeder, although 8 cells is probably all that's needed:

Code: Select all

x = 6, y = 11, rule = B2-p_S2-m5H
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:

Code: Select all

x = 16, y = 40, rule = B2-p_S2-m5H
obo$b2o$2bo2$3bo$2o4b2o7$4bo5bo$6bo2bo4$8b4o5$12bo$11bo2bo$13bo$13b2o
13$13bo$15bo!
Saka wrote:
April 20th, 2018, 8:20 am
Well this is cool

Code: Select all

x = 75, y = 84, rule = B2o3o_S2o3o4-mH
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?

Code: Select all

x = 43, y = 43, rule = B2o3o4o_S2o3op46H
b2o5b2o$2o8b2o$b2o7b2o$bo10bo$2bo3b3o3bo$7b2o$8bo4$8bobobo$9b4o$11bo
18$31b2o5b2o$30b2o8b2o$31b2o7b2o$31bo10bo$32bo3b3o3bo$37b2o$38bo4$38bo
bobo$39b4o$41bo!
toroidalet wrote:
April 20th, 2018, 11:03 am
chaotic replicator-based (20,20)c/412 ship (hexagonal speed):

Code: Select all

x = 98, y = 105, rule = B2o3o4o_S2o3op46H
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:

Code: Select all

x = 11, y = 52, rule = B2o3o4o_S2o3op46H
o9$8b3o$o8b2o$10bo29$o9$8b3o$o8b2o$10bo!