I have a problem with metafier

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
gameoflifemaniac
Posts: 1032
Joined: January 22nd, 2017, 11:17 am
Location: There too

I have a problem with metafier

Post by gameoflifemaniac » January 25th, 2017, 6:19 am

When I try to run 'metafier', it gives me an error:
Error reading Life.rule on line 4: unsupported neighborhood
and then
Desktop\golly-2.8.win-32bit\Scripts\Lua\metafier.lua:96:
Given rule is not valid in any algorithm.
How to fix that?
I was so socially awkward in the past and it will haunt me for my entire life.

User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
Contact:

Re: I have a problem with metafier

Post by Saka » January 25th, 2017, 6:47 am

Try running in quicklife and not ruleloader. If it doesn't work, try the python version

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

User avatar
gameoflifemaniac
Posts: 1032
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: I have a problem with metafier

Post by gameoflifemaniac » January 25th, 2017, 8:40 am

But I can't run Python scripts!
I was so socially awkward in the past and it will haunt me for my entire life.

User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
Contact:

Re: I have a problem with metafier

Post by Saka » January 25th, 2017, 8:50 am

gameoflifemaniac wrote:But I can't run Python scripts!
Wynaut? Did you try QuickLife and HashLife?

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

User avatar
gameoflifemaniac
Posts: 1032
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: I have a problem with metafier

Post by gameoflifemaniac » January 25th, 2017, 9:42 am

Yes, I did, but it doesn't work. I did install Python too, but it gives me an error, when I try to run the Python script.
So what to do?
I was so socially awkward in the past and it will haunt me for my entire life.

User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
Contact:

Re: I have a problem with metafier

Post by Saka » January 25th, 2017, 7:58 pm

gameoflifemaniac wrote:Yes, I did, but it doesn't work. I did install Python too, but it gives me an error, when I try to run the Python script.
So what to do?
I am also having problems running Python on golly 2.8. Try downloading an older version, 2.7

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

User avatar
dvgrn
Moderator
Posts: 6725
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: I have a problem with metafier

Post by dvgrn » January 25th, 2017, 11:32 pm

It really looks like you have some kind of nonstandard settings. Did you have older versions of Golly on your computer before you went to 32-bit Golly 2.8? I can't think how, exactly, but it seems vaguely possible that an old GollyPrefs with a pointer to a non-default Rules folder could do something like this. Can you quote or attach your GollyPrefs file here? It's written out every time Golly closes normally, so should have a recent timestamp.

For the record, the file Life.rule should look like this:

Code: Select all

@RULE Life

@TREE

num_states=2
num_neighbors=8
num_nodes=32
1 0 0
2 0 0
1 0 1
2 0 2
3 1 3
1 1 1
2 2 5
3 3 6
4 4 7
2 5 0
3 6 9
4 7 10
5 8 11
3 9 1
4 10 13
5 11 14
6 12 15
3 1 1
4 13 17
5 14 18
6 15 19
7 16 20
4 17 17
5 18 22
6 19 23
7 20 24
8 21 25
5 22 22
6 23 27
7 24 28
8 25 29
9 26 30
So the error message as quoted, "Error reading Life.rule on line 4: unsupported neighborhood", seems to be saying that the blank line 4 is being read as an unsupported neighborhood. Or there's something else saved in the place of the normal Life.rule, or Golly is looking in a different folder and finding a different Life.rule. Check your Preferences > Control tab -- what is the Your Rules path, and is there a Life.rule in that folder?

I don't really like any of those theories, but can't think of anything better. Maybe try re-downloading Golly 2.8 and decompressing to a different folder -- or downloading 2.7 instead, as Saka suggests... but really I don't think anything changed in the way Python is handled between 2.7 and 2.8, so I doubt that will make any difference.

User avatar
gameoflifemaniac
Posts: 1032
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: I have a problem with metafier

Post by gameoflifemaniac » January 27th, 2017, 6:54 am

OMG OMG OMG OMG it works! Thanks!
I was so socially awkward in the past and it will haunt me for my entire life.

User avatar
gameoflifemaniac
Posts: 1032
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: I have a problem with metafier

Post by gameoflifemaniac » January 27th, 2017, 6:58 am

But I have NO idea how it happened!
I was so socially awkward in the past and it will haunt me for my entire life.

User avatar
dvgrn
Moderator
Posts: 6725
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: I have a problem with metafier

Post by dvgrn » January 27th, 2017, 8:24 am

gameoflifemaniac wrote:But I have NO idea how it happened!
Well, a lot of Golly scripts tend to get written with unstated assumptions buried in them. One of the most common oversights is for a script to start working on a cell list without checking first if it is two-state, where cells are described by pairs of numbers in a list, or multi-state where the list is made up of triplets because the cell state has to be included. So a script might work great when the author tests it in plain B3/S23, but it crashes mysteriously or makes a strange-looking mess if someone accidentally runs it with the Golly universe in LifeHistory mode.

I don't think it's anything quite so simple in this case. However, the error message did seem to indicate that there was something strange going on with the rule Golly was starting with, or maybe the algorithm...?

Good to hear that the problem seems to have resolved itself, anyway. If it ever comes back and you see any clues as to what triggered it, please let me know. I should probably add some more robust error-checking to various scripts for the next release, and this would be probably be a good test case to know about, if we could ever figure out what it was.

What pattern were you selecting originally, in your first attempt to make a metapattern? Was it something a little less common, like a pattern on a bounded grid? Or just one you drew yourself?

User avatar
gameoflifemaniac
Posts: 1032
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: I have a problem with metafier

Post by gameoflifemaniac » January 28th, 2017, 5:31 am

The first metapattern that I have saved in Golly and build by hand was the pentadecathlon, and the first metapattern build by the script was probably the pentadecathlon, too.
I was so socially awkward in the past and it will haunt me for my entire life.

User avatar
dvgrn
Moderator
Posts: 6725
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: I have a problem with metafier

Post by dvgrn » January 28th, 2017, 1:53 pm

gameoflifemaniac wrote:The first metapattern that I have saved in Golly and build by hand was the pentadecathlon, and the first metapattern build by the script was probably the pentadecathlon, too.
Hm. No clues there, then. It's just the Lua script that's working now, right?

Lua is still very new, so there aren't Lua versions of a lot of existing Python scripts yet -- though the translation is usually fairly straightforward, so it's just a matter of someone deciding to make the effort.

What was the name of the Python installer .exe you used? The error you see when you try to run any Python script is "The Python library does not have this symbol: Py_InitModule4" -- right?

It's still true that most Golly Python problems are easily solvable in a few minutes, with enough information. Occasionally an inscrutable mystery appears, but those are relatively rare. I haven't really sorted it out yet, but it seems as if Py_InitModule4 errors were more common back with Python 2.6, but more related to 64-bit (?) So it would be good to know exactly which Python installer you tried.

Post Reply