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

gencols: techniques

For scripts to aid with computation or simulation in cellular automata.

Re: Problem with gencols/3g.py

Postby dvgrn » July 14th, 2017, 1:12 pm

gmc_nxtman wrote:
5, 6, 7, 9, 8, 9, 12, 11

x = 7, y = 9, rule = B3/S23
4bobo$o3b2o$b2o2bo$2o3$5bo$4b2o$4bobo!

In case there's something odd with gencols itself, here's a few lines of 3g.col...

Thanks! It all looks perfectly healthy to me, but there's always a reason why these things aren't working. Probably something obvious, once somebody points it out.

Here's what your 3g.col output is really saying, when you unpack each line by replacing exclamation points:

......*
....*.*
.....**





.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**





.....**
....*.*
......*
.............**
.............*.*
.............*



---------------------------



...*
.*.*
..**







.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**







...**
..*.*
....*
...........**
...........*.*
...........*



---------------------------



...*
.*.*
..**






.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**






...**
..*.*
....*
...........**
...........*.*
...........*



---------------------------



..*
*.*
.**







.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



.....*
...*.*
....**






.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**






.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**






....**
...*.*
.....*
............**
............*.*
............*



---------------------------



....*
..*.*
...**







.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**







..**
.*.*
...*
..........**
..........*.*
..........*



---------------------------



....*
..*.*
...**






.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**






..**
.*.*
...*
..........**
..........*.*
..........*



---------------------------



.......*
.....*.*
......**




.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



.......*
.....*.*
......**



.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



......*
....*.*
.....**






.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



.....*
...*.*
....**







.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**







....**
...*.*
.....*
............**
............*.*
............*



---------------------------



........*
......*.*
.......**



.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**






.....**
....*.*
......*
.............**
.............*.*
.............*



---------------------------



..*
*.*
.**







.....**
....*.*
......*
.............**
.............*.*
.............*



---------------------------



...*
.*.*
..**








.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**








...**
..*.*
....*
...........**
...........*.*
...........*



---------------------------



..*
*.*
.**








.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**








....**
...*.*
.....*
............**
............*.*
............*



---------------------------



....*
..*.*
...**








.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**








..**
.*.*
...*
..........**
..........*.*
..........*



---------------------------



..*
*.*
.**








.....**
....*.*
......*
.............**
.............*.*
.............*



---------------------------



..*
*.*
.**







......**
.....*.*
.......*
..............**
..............*.*
..............*



---------------------------



..*
*.*
.**






......**
.....*.*
.......*
..............**
..............*.*
..............*



---------------------------



..*
*.*
.**





......**
.....*.*
.......*
..............**
..............*.*
..............*



---------------------------



..*
*.*
.**




......**
.....*.*
.......*
..............**
..............*.*
..............*



---------------------------



..*
*.*
.**



......**
.....*.*
.......*
..............**
..............*.*
..............*



---------------------------



..*
*.*
.**


......**
.....*.*
.......*
..............**
..............*.*
..............*



---------------------------



..*
*.*
.**








......**
.....*.*
.......*
..............**
..............*.*
..............*



---------------------------



..*
*.*
.**









...**
..*.*
....*
...........**
...........*.*
...........*



---------------------------



..*
*.*
.**









.**
*.*
..*
.........**
.........*.*
.........*



---------------------------



..*
*.*
.**









....**
...*.*
.....*
............**
............*.*
............*



---------------------------



..*
*.*
.**









..**
.*.*
...*
..........**
..........*.*
..........*



---------------------------



..*
*.*
.**









.....**
....*.*
......*
.............**
.............*.*
.............*



---------------------------



...*
.*.*
..**









.**
*.*
..*
.........**
.........*.*
.........*

That's gliders traveling NW, NE, and SE, all right, and the NW and NE ones start interacting between T=10 and T=13, and the next one interacts by 12 ticks after that, T=25 (unless it misses, which does happen sometimes in edge cases like the last line you quoted -- I believe that's known gencols behavior). So far so good -- gencols seems to be doing its job.

..*
*.*
.**









..**
.*.*
...*
..........**
..........*.*
..........*

If you rotate your sample R recipe by 180 degrees and back it off by a dozen ticks or so, it certainly looks like something that should show up in some line or other of your 3g.col. So why isn't it there? Or is the script not seeing it?

One thing you could do is make your own test.col and point the script at that --

*.*!.**!.*!!!!.....**!.*..**!.**...*!*.*!

Very likely chris_c's script will find the R-pentomino fine if you append the above line to 3g.col -- though it will take a while of course. Should be pretty much instantaneous if the above is the only line in the file. What kind of run times are you seeing, to get through the full 3g.col and back to a command prompt?

If that R-pentomino collision isn't in 3g.col, for whatever reason, then it would be good to know why. I can have a look later. Anyone else have an easy explanation in the meantime? I'm not really a gencols expert, I just play one on the forums...!
dvgrn
Moderator
 
Posts: 3927
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: gencols: techniques

Postby gmc_nxtman » July 14th, 2017, 1:33 pm

I appended the test sample to the beginning of 3g.col (also entering a different population sequence as necessary), and the script didn't find it.

8, 9, 12, 11, 18, 11, 11, 10


I also tried with the original collision (....*.*!*...**!.**..*!**!.....*!....**!....*.*) and appended that. Entering the original corresponding population sequence into the script doesn't seem to find that either. Doing a quick ctrl-F search finds neither of the possible R-pentomino collisions, which might suggest a problem with gencols as well, or a not-thorough-enough search on my part...!
User avatar
gmc_nxtman
 
Posts: 1043
Joined: May 26th, 2015, 7:20 pm

Re: gencols: techniques

Postby dvgrn » July 14th, 2017, 2:03 pm

gmc_nxtman wrote:I also tried with the original collision (....*.*!*...**!.**..*!**!.....*!....**!....*.*) and appended that. Entering the original corresponding population sequence into the script doesn't seem to find that either.

That's not the original collision -- should be ....*.*!*...**!.**..*!**!!!.....*!....**!....*.*!

Looks like maybe you hand-translated the RLE, same as I did? There's a "3$" in the middle that actually means "two blank lines" -- I did it wrong also (!). And I only checked to see that my reconstruction made an R-pentomino, and didn't notice that it wasn't the same one... sometimes the Life universe just doesn't play fair.

....*.*
*...**
.**..*
**
.
.
.....*
....**
....*.*

vs. my version (unrotated):
....*.*
*...**
.**..*
**
.
.
.
.....*
....**
....*.*

gmc_nxtman wrote:Doing a quick ctrl-F search finds neither of the possible R-pentomino collisions, which might suggest a problem with gencols as well, or a not-thorough-enough search on my part...!

You wouldn't find your !*.-encoded collision in the 3g.col file, nor mine, though I did rotate mine 180 degrees so that's one step closer. You'd have to back all the gliders up by 10-13 ticks to get a pattern that maybe ought to be in the list.

In general it's probably best to spend at least a few days continuing to assume that you and I are making mistakes like the above, and try to find them... and then look at all of the results gencols is actually putting out again. What chris_c's script does, and for that matter what gencols does, is simple enough that usually it turns out that Problem Exists Between Keyboard And Chair... somehow.

I've double-checked both of your population sequences with LifeViewer ('G' shortcut), by the way -- definitely don't see any mistakes there.

EDIT: Are you letting the script run to completion? How long does it take for the full 3g.col?

EDIT2: On second reading, that script really ought to be rewritten to not use the clipboard -- it's assuming that nobody will use the clipboard for anything else while the script is running. Otherwise it might silently lose matches from early in the run, or possibly error out mysteriously if the clipboard contents look like invalid RLE.

It's pretty simple to patch it to use g.getcells(g.getrect()) instead -- maybe copy results-so-far to the clipboard only on demand, say if the user hits Ctrl+C while the script is running.
dvgrn
Moderator
 
Posts: 3927
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: gencols: techniques

Postby M. I. Wright » August 20th, 2017, 8:29 pm

Minor necro, apologies, but I'm quite confused about the meaning of "Also match the phase of this pattern with pattern 2" in the Arguments.Explanation description of -test2. As I understand it, -del and -test1 all serve to forcefully ignore some desired pattern such that it doesn't interfere with the output filters, so what additional functionality does -test2's phase-matching provide?

EDIT: Oh. Duh. -nph can change the phase of pattern2, so -test2 will simply advance its given pattern automatically by however much is needed in order to match it with the current pattern2 phase. After looking at codeholic's pi fuse examples early in this thread it's easy to see when this is useful.
M. I. Wright
 
Posts: 305
Joined: June 13th, 2015, 12:04 pm

Re: gencols: techniques

Postby M. I. Wright » September 1st, 2017, 2:38 pm

Hm.
x = 31, y = 9, rule = B3/S23
b2o2bob2o$o2bo2b2o$bobo$2bo$8bo7b6o$6b3o7bo5bo5b2o$5bo10bo10b4o$6bo10b
o4bo3b2ob2o$7b2o10b2o6b2o!
There are plenty of possible placements for a third *WSS that leave the transient eater intact, but I can't seem to get gencols to find any of them. Perhaps I'm misunderstanding how -test1 works... could somebody check this over, please?

gencols:
./gencols -pat obj/2wss_loafer.life obj/allss_w.list -nph 4 -tc 17 45 -gen 200 -test1 obj/eater_se1.life -filt ap > findeater.col
Finishes search with 0 results.

obj/2wss_loafer.life:
.**..*.**
*..*..**
.*.*
..*
........*.......******
......***.......*.....*.....**
.....*..........*..........****
......*..........*....*...**.**
.......**..........**......**
M. I. Wright
 
Posts: 305
Joined: June 13th, 2015, 12:04 pm

Previous

Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron