Re: Script request thread
Posted: December 28th, 2017, 9:59 am
Thanks, that's exactly what I was looking forcalcyman wrote:For non-totalistic isotropic rules, it delegates to ntcanon.py.
Thanks, that's exactly what I was looking forcalcyman wrote:For non-totalistic isotropic rules, it delegates to ntcanon.py.
You can probably rig up something using ulimit(1). Set a memory limit, and create a wrapper script that detects whether apgluxe aborted due to a failed allocation and restarts it if so.danny wrote:A version of apgluxe that quits and restarts if the ram usage exceeds a certain limit
Here you go, this should do it: https://gist.github.com/vyznev/0ef7eb2a ... 647f10d685muzik wrote:Since Golly doesnt support them yet for some reason, can we get a script that changes a non-totalistic hexagonal rule into its MAP string?
Code: Select all
x = 25, y = 13, rule = MAPFAMgVwhXAP4AP4B+gH4A6A
17b2o$2bo15b2obo$b2obo13bob2o$2ob3o13b2ob2o$2bobobo13bobo$2b2ob4o3b2o
6bob2o$2bob2obo5b3o4b3obo$13bobo6bo$12b4o$12bo3bo$13b5o$15bo$15bo!
Code: Select all
x = 25, y = 13, rule = MAPEUQAMyIAVXcRRAAzIgBVdwCIVXcAAP/uAIhVdwAA/+4AADP/iAB37gAAM/+IAHfuiAB37gAA7oiIAHfuAADuiA
17b2o$2bo15b2obo$b2obo13bob2o$2ob3o13b2ob2o$2bobobo13bobo$2b2ob4o3b2o
6bob2o$2bob2obo5b3o4b3obo$13bobo6bo$12b4o$12bo3bo$13b5o$15bo$15bo!
This gets a +1 from me because I need to find that one rule where the bun evolves into a monogram77topaz wrote:Is it possible to make a script that, given an apgcode, looks through Catagolue for rules where that apgcode has appeared and then returns the rule in which that pattern is the most common relative to other patterns (i.e. in which it appears the highest in the list of most common objects)?
The support is built and will be in the next released build.vyznev wrote:Alas, LifeViewer doesn't seem to currently support 3+22 character MAP rules, and so refuses to run the pattern above.
I also need to find the rule with the xp104_hexeh and xp14_eh so +1danny wrote:This gets a +1 from me because I need to find that one rule where the bun evolves into a monogram77topaz wrote:Is it possible to make a script that, given an apgcode, looks through Catagolue for rules where that apgcode has appeared and then returns the rule in which that pattern is the most common relative to other patterns (i.e. in which it appears the highest in the list of most common objects)?
(even though I only know Javascript and not much of it)77topaz wrote:Is it possible to make a script that, given an apgcode, looks through Catagolue for rules where that apgcode has appeared and then returns the rule in which that pattern is the most common relative to other patterns (i.e. in which it appears the highest in the list of most common objects)?
B2i3-ck6/S2-i35nMajestas32 wrote:Also the xp170 OMOS from my avatar
Code: Select all
x = 7, y = 3, rule = B2i3-ck4e6/S2-i35n
o5bo$2o3b2o$o5bo!
I mean only a few thousand of those rules have been searched on Catagolue tho.toroidalet wrote: A brute-force search of all 2^98 (about 3.17*10^29) (excluding B0, B1 and B2a) possible non-totalistic rules seems impractical. How would this limitation be surpassed?
Indeed, that was my point, the Catagolue database is of a size a lot smaller than 10^29; it should be searchable.Majestas32 wrote:I mean only a few thousand of those rules have been searched on Catagolue tho.toroidalet wrote: A brute-force search of all 2^98 (about 3.17*10^29) (excluding B0, B1 and B2a) possible non-totalistic rules seems impractical. How would this limitation be surpassed?
Code: Select all
# cardinality.py (Rhombic, Feb 2018)
# Calculates the non-totalistic cardinality of a partial rule.
# The cardinality of a partial rule is the number of rules in the rulespace defined by the partial conditions.
# This script is Golly-independent.
print "Please input partial rules in appropriate format pB/S."
partial=raw_input("Partial rule: ")[2:]
ntcvals=["c","ce","aceikn","aceijknqry","aceijknqrtwyz","aceijknqry","aceikn","ce","c"]
pbs=partial.split("/S")
names=["Birth","Survival"]
total=0
for W in [0,1]:
pbs[W]+="/"
for cells in xrange(9):
if str(cells) in pbs[W]:
pos=pbs[W].index(str(cells))
for n in xrange(len(pbs[W])):
if pbs[W][pos+n+1] in "012345678/":
length=n
break
else:
pass
if "-" not in pbs[W][pos:pos+length+1]:
N=len(ntcvals[cells])-length
total+=N
print names[W]+" conditions for %d gave "%cells+str(N)+" new combinations."
else:
N=len(ntcvals[cells])-length+1
total+=N
print names[W]+" conditions for %d gave "%cells+str(N)+" new combinations."
else:
pass
print "2^"+str(total)+" rules available."
Just two-spaceship collisions right? That's probably doable, but if you have more than two spaceships colliding finding "all" collisions becomes non-trivial (just look at the "enumerating three-glider collisions" thread, and that's for CGoL with one elementary spaceship).googleplex wrote:I would like a script that, given a rule and 1-4 elementary spaceships, finds all collisions and outputs them to an rle.
Yes, just two ship collisions.77topaz wrote:Just two-spaceship collisions right? That's probably doable, but if you have more than two spaceships colliding finding "all" collisions becomes non-trivial (just look at the "enumerating three-glider collisions" thread, and that's for CGoL with one elementary spaceship).googleplex wrote:I would like a script that, given a rule and 1-4 elementary spaceships, finds all collisions and outputs them to an rle.
Though, isn't it only rules with the Von Neumann neighbourhood that have checkerboard duals?Majestas32 wrote:And the checkerboard dual too
Only self-complementary rules, actually.77topaz wrote:Though, isn't it only rules with the Von Neumann neighbourhood that have checkerboard duals?
Hmm. If I'm not totally confused, all self-complementary isotropic rules on the square lattice should indeed have checkerboard duals, but the checkerboard duals of totalistic rules are totalistic only on the von Neumann neighborhood (or, more generally, on any neighborhood where all neighbors of each cell have the same color on the checkerboard). So in a way, you're both right, it just depends on which class of rules (totalistic or general isotropic) you consider.A for awesome wrote:Only self-complementary rules, actually.77topaz wrote:Though, isn't it only rules with the Von Neumann neighbourhood that have checkerboard duals?