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

Sample metapatterns made of Calcyman's metacells

For discussion of specific patterns or specific families of patterns, both newly-discovered and well-known.

Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 25th, 2017, 9:37 am

How about posting some patterns made out of Calcyman's stable metacells?
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby dvgrn » January 25th, 2017, 10:35 am

Original instructions:

calcyman wrote:I have (eventually) managed to construct a stable metacell. The only
active element is the drive gun, which (in this case) is p16777216.
Everything else is composed of Herschel tracks and reflectors,
allowing the period of the drive gun to be any period whatsoever. I
chose this particular period since it's good with HashLife. The
dimensions are also a power of two (32768*32768). These can be
extended by multiples of four, as long as the drive gun is
sufficiently slow as to allow the incoming neighbour signals to
arrive on time.

The rule is programmed in a sequence of 512 eaters, allowing for any
non-totalistic rule. In this example they are coded for Life. This
property can also be used to make a 256-bit serial memory cell and
universal logic gates.

The most striking feature of all is the orientation. Rather than
being aligned with the axis, like Brice Due's OTCAmetapixel or David
Bell's Unit Cell, it's actually rotated by 45°. The display also has
this orientation, and takes up approximately ¾ of the width of the
pattern.

A zipped file containing megacell-ON.rle, megacell-OFF.rle and
megafier.py can be found at:

http://cranemtn.com/life/files/UMC.zip

Unzip this file in your Golly\Scripts folder and then select an area
of (about) 100 cells. Run the script and it will tile the plane with
metacells. After running it for one time step (8^8 generations), the
original pattern will be visible on the display.

The following people have assisted in the construction of this
metacell:

David Buckingham - Herschel tracks
Paul Callahan - Herschel receiver
Stephen Silver - Stable reflector
Brice Due - Metapixel idea, Herschel -> block converter
Dave Greene - LWSS <--> glider technology, boojum reflector, block
puller
Deiter Leithner - LWSS -> glider principle
dvgrn
Moderator
 
Posts: 4029
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 25th, 2017, 12:01 pm

But how to tile them? I can't run Python scripts. Maybe someone could make a Lua sequel?
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby dvgrn » January 25th, 2017, 12:10 pm

gameoflifemaniac wrote:But how to tile them? I can't run Python scripts. Maybe someone could make a Lua sequel?

Can you explain exactly why you can't run Python scripts? Exactly what error text is displayed when you try?

(And have you triple-checked that you've installed the 64- or 32-bit version of Python that matches the 64- or 32-bit version of Golly that you're using?)

Maybe the someone who does the translation to Lua could be you...! If you compare metafier.py with metafier.lua, I think you'll find it's fairly straightforward (as these things go) to figure out what changes need to be made to megafier.py to get megafier.lua. The megafier script was copied from the metafier script with minimal changes (though a lot of reduction).

I'll have a look later and see if I can figure out why you're seeing error messages in the Lua metafier script. What rule was set in Golly when you tried running the script?
dvgrn
Moderator
 
Posts: 4029
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 25th, 2017, 12:20 pm

I did install Python and both Golly and Python are 32-bit, but it gives me an error:
The Python library does not have this symbol:
Py_InitModule4
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby dvgrn » January 25th, 2017, 3:30 pm

gameoflifemaniac wrote:I did install Python and both Golly and Python are 32-bit, but it gives me an error:
The Python library does not have this symbol:
Py_InitModule4

What version of Python did you install? It needs to be Python 2.x -- 2.7.13 seems to be all right, for example, though we had some trouble with the installer for 2.7.11. Golly doesn't support Python 3.x, at least for the moment.

Also, what's your operating system? I should have asked before. Should probably write up a flowchart for diagnosing Python problems -- I always seem to forget half of the relevant details between cases.
dvgrn
Moderator
 
Posts: 4029
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 27th, 2017, 4:34 am

But... could someone post a Calcyman metapattern on this forum?
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby dvgrn » January 27th, 2017, 12:14 pm

gameoflifemaniac wrote:But... could someone post a Calcyman metapattern on this forum?

The attachment megafied_Rich's_p16.mc.gz is no longer available

Below is a minimal Lua version of the Python megafier script. Like the original, and unlike metafier.py/lua, it doesn't have an internal representation of the OFF and ON cells. So it will refuse to work unless the megacell-ON.rle and megacell-OFF.rle files (included in the ZIP again) are saved to the Scripts/Lua directory.

We can do better than that, just not right away...

I'm hereby starting a contest for the shortest (in bytes) Lua script that can build cell lists matching megacell-ON.rle and megacell-OFF.rle, without referring to any external pattern files. See metafier.py/lua for comparison -- they're a lot shorter than the two RLE files they generate.

If the script can reprogram the megacell to match the Life-like or isometric non-totalistic rule from the current Golly universe, that's worth 16,777,216 bonus bytes... which is to say, any script that can manage the megacell-reprogramming task will win over any script that can't, pretty much.

-- I might have an entry in the GMBPCC (the Great Megacell Base Pattern Compression Competition) myself at some point, to be integrated into megafier.lua v1.0 -- but I'm not promising anything.

EDIT: removed buggy megafier_Lua_v0.5.zip
megafier-Lua-v0.6.zip
script filenames were incorrect in v0.5. Place contents in Lua folder as before.
(352.98 KiB) Downloaded 48 times

I found the mega-Rich's-p16 to be fairly memory-intensive. Golly pretty much refused to advance the pattern past a few hundred thousand ticks on my first try, with the default maximum 500MB memory use setting. But it worked great as soon as I bumped the Preferences > Control > Maximum Memory setting up to 6GB.
Attachments
megafied_Rich's_p16.mc.gz
megafied Rich's p16 oscillator
(124.81 KiB) Downloaded 55 times
dvgrn
Moderator
 
Posts: 4029
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 29th, 2017, 7:58 am

When I try to run the script, it shows:
Can't find prebuilt megapixel ON cell.
Where should I place the megacell files?
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 29th, 2017, 11:04 am

When I save the megacell files in the Scripts folder, it doesn't work.
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby dvgrn » January 29th, 2017, 12:18 pm

gameoflifemaniac wrote:When I save the megacell files in the Scripts folder, it doesn't work.

Sorry about that! Had some trouble uploading new files this morning, for some reason. Try the v0.6 ZIP file I just posted -- I've corrected the filenames.

I'll edit this post to add a first not-very-good entry in the GMBPCC shortly, with any luck.

EDIT: GMBPCC entry number 1: megafier-dvgrn1.lua, 443K. Worse than I thought -- Lua's default method of escaping control characters is not very efficient -- but at least it's smaller than one RLE-format megacell file.

megafier-dvgrn1.zip
First entry in Great Megapixel Base Pattern Compression Contest
(214.48 KiB) Downloaded 44 times

Of course, .mc files are only 229K to RLE's 686K. I tried encoding .mc.gz files instead, since they're only 76K -- but the control-character escapes took up more room than the compression saved.
dvgrn
Moderator
 
Posts: 4029
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 29th, 2017, 2:09 pm

It still shows the same error!
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 29th, 2017, 2:10 pm

Oh, it works!!!!!!
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 29th, 2017, 2:17 pm

Another problem! When I made a metapattern simulating the rule Just Friends, it behaved differently than the original.
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 29th, 2017, 2:19 pm

I can simulate only Life and no other rules! The megapattern simulates Life, no matter what rule I will set Golly.
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby dvgrn » January 29th, 2017, 2:50 pm

gameoflifemaniac wrote:I can simulate only Life and no other rules!

That's right. Again, please slow down a bit, and there's no need for double- and triple-posting -- just edit your previous messages. (That's the general rule, and no, I don't always follow it either.)

The original instructions hinted, and I mentioned in the contest description, that the base megacell patterns are hard-coded for B3/S23 at the moment.

Some future version of the script will edit the row of 512 eaters in the megacells to match whatever the current rule is, before tiling them. Anyone care to volunteer for the task? It's part of the official GMBPCC rules... and I can give more details if someone needs them (after I figure them out myself).

I thought of an entertaining way to get a "patch" pattern to paste in on top of the OFF and ON base megacell patterns, by running a certain diagonal series of 3x3 patterns for one tick in the original pattern's rule. Plus one more step, an AND operation with a diagonal row of 512 singleton ON cells.

Meanwhile, you can hand-edit the two base megacell patterns if you want them to run Just Friends patterns. I can't tell you exactly how, because I don't remember how the encoding mechanism works exactly -- but it's possible to figure it out by inspection...!

EDIT: Here's a factor-of-two improvement in the size of the megafier Lua script. It turned out that megacell-ON.rle is the same as megacell-OFF.rle, except for the addition of exactly three boats. These represent "I'm here" signals from neighbors #5, #6, and #7, and so of course they trigger the megacell to turn ON in the next cycle.

megafier-dvgrn2.zip
Second contest entry, 224K -- ONcell defined from OFFcell instead of independently
(108.42 KiB) Downloaded 49 times

I spent some time this afternoon figuring out how the circuitry works -- mostly by experimenting with different 3x3 inputs to the script and using LifeHistory to see where the signals went (running at around 8^5 instead of 8^8). It's been almost a decade since this pattern first showed up, so I didn't remember much about the inner workings of the megacell. It was very enjoyable to rediscover the various elegant mechanisms -- wouldn't want to spoil anyone else's fun! But I can certainly explain more on request.

EDIT 2: Getting close to picking up my 16-million point bonus (I like this contest I've made up, even if no one else does). There's one more detail to sort out before the universal script can go live, having to do with ON cells in different rules needing different setup, over and beyond the presence or absence of the 512 eaters.

Meanwhile --
megafied-JustFriends-p41osc.mc.gz
p41 oscillator using Calcyman's metacells reprogrammed for Just Friends rule
(124.53 KiB) Downloaded 42 times
dvgrn
Moderator
 
Posts: 4029
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » January 31st, 2017, 11:45 am

Thanks! You're a good friend!
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby dvgrn » January 31st, 2017, 10:46 pm

Here are a couple more megacell patterns, just to make sure the script can program the megacells correctly for arbitrary rules. It's nice that Golly can run isotropic rules natively now!

megafied-B2cek3iS12cei.mc.gz
(122.95 KiB) Downloaded 49 times

megafied-spiral-growth-B34568S15678.mc.gz
(123.77 KiB) Downloaded 43 times

The universal megafier script hasn't made it to where it can be an official contest entry again yet, because I went back to keeping the unprogrammed megacell in a separate file temporarily. I may get around to fixing that eventually, to claim my 16 million point bonus.

But in the meantime...

megafier-universal.zip
Megafier Lua script that creates megacells matching the rule currently set in Golly
(76.04 KiB) Downloaded 52 times

It made me unreasonably happy that both the 512-eater setup algorithm, and the algorithm for setting up an ON cell for arbitrary rules, worked perfectly the first time I tried them. Bug-free code is usually something I have to fight pretty hard for...! But maybe someone else can find a bug I've missed -- please let me know.

EDIT: I did notice an exceptional case that might qualify as a bug. If you're trying to program the megacell to simulate a B0-no-S8 rule, you'll end up instead with the odd-generations rule that Golly uses to simulate B0-no-S8 rules. Since there's a different even-generations rule, the megafied pattern ends up not working right. Will fix that... relatively soon.

There are a couple of other things left to do. The main trick to add will be proximity fuses like the ones in the OTCA metacell -- there should be eaters all around each megacell, in each of the eight cardinal/intercardinal directions, that only self-destruct in the presence of a matching eater from the next megacell in that direction.

As it stands, you have to select a blank line of cells all around any oscillator you might want to megaficate... otherwise the megafied pattern leaks gliders wherever there's an ON cell at the edge (!) Also, non-convex patches of megacells are definitely not going to work very well without this kind of proximity detection.

Then of course all the circuitry in the megacell is ten years out of date. A lot of the counting circuits could be done much more efficiently with semi-Snarks, for example... but in a pattern of this size, what's an extra order of magnitude here or there, really?
dvgrn
Moderator
 
Posts: 4029
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » February 1st, 2017, 4:28 am

I'm very happy seeing the universal script. You are really a good friend!
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby gameoflifemaniac » February 1st, 2017, 4:48 am

Sorry, but I have an another problem. When I try to run the script, it shows:
...0\golly-2.8-win-32bit\Scripts\Lua\megafier-universal.lua:58:
Can't open pattern file:
megacell-OFF-unprogrammed.mc.gz
I am currently in Germany and using my grandmas laptop, so the bug might not occur on our computer at home. But what caused the bug(even when I saved the megacell file)?
https://www.youtube.com/watch?v=q6EoRBvdVPQ
One big dirty Oro. Yeeeeeeeeee...
User avatar
gameoflifemaniac
 
Posts: 423
Joined: January 22nd, 2017, 11:17 am
Location: 54°00'39.4"N 21°43'50.5"E

Re: Sample metapatterns made of Calcyman's metacells

Postby Saka » February 1st, 2017, 5:05 am

dvgrn wrote:Blahblahblah

Metafier universal.lua

Blahblahblah

Crashed my computer @Converting pattern with a 16 x 16 box :x Is that supposed to happen (is 16 x 16 too big?)
Last edited by Saka on February 1st, 2017, 7:28 am, edited 1 time in total.
Everyone, please stop posting B/S about CA
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: 2266
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X

Re: Sample metapatterns made of Calcyman's metacells

Postby calcyman » February 1st, 2017, 7:28 am

Saka wrote:Crashed my computer @Converting pattern with a 16 x 16 box :x Is that supposed to happen (is 16 x 16 too big?)


That's believable, yes; Golly scripts for assembling metapatterns build them as a flat (uncompressed) representation before converting it into a compressed quadtree. If you want to construct larger metapatterns (such as the meta-meta-blinker I posted), you need to build the pattern in something other than Golly.
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 1370
Joined: June 1st, 2009, 4:32 pm

Re: Sample metapatterns made of Calcyman's metacells

Postby Saka » February 1st, 2017, 7:29 am

calcyman wrote:
Saka wrote:Crashed my computer @Converting pattern with a 16 x 16 box :x Is that supposed to happen (is 16 x 16 too big?)


That's believable, yes; Golly scripts for assembling metapatterns build them as a flat (uncompressed) representation before converting it into a compressed quadtree. If you want to construct larger metapatterns (such as the meta-meta-blinker I posted), you need to build the pattern in something other than Golly.

Please explain more about this, I'm interested
Everyone, please stop posting B/S about CA
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: 2266
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X

Re: Sample metapatterns made of Calcyman's metacells

Postby calcyman » February 1st, 2017, 7:56 am

Saka wrote:Please explain more about this, I'm interested


When you save a pattern in Golly, it can either be saved as RLE or .mc. The latter represents the pattern as a textualised version of the data structure used by Gosper's HashLife algorithm to represent patterns. In particular, you give each distinct 2^n-by-2^n tile a unique identifier, and specify which four 2^(n-1)-by-2^(n-1) subtiles it comprises (i.e. the north-west, north-east, south-west and south-east subtiles).

Now, when you use a Golly script to assemble a pattern, you manipulate cell lists (which take 2 Python integers -- i.e. 24 bytes on a 32-bit machine or 48 bytes on a 64-bit machine -- to represent each live cell!). Even if you paste these into a QuickLife universe, the format is still flat (and will take more than 1 bit of memory per live cell). So my meta-meta-blinker, with its 92 805 939 317 live cells, would occupy more than 11 GB of RAM. The laptop I used to assemble it has 6 GB of RAM, proving that I didn't build the meta-meta-blinker in a flat format.

If you instead manipulate compressed quadtrees in memory, then your memory consumption will not greatly exceed the size of the final macrocell file, and the pattern can be assembled much more quickly. Copying and pasting patterns, along with boolean operations (and, or, xor), rotations, et cetera, can all be implemented in a memoized recursive manner (similar to HashLife itself, albeit less sophisticated).
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 1370
Joined: June 1st, 2009, 4:32 pm

Re: Sample metapatterns made of Calcyman's metacells

Postby Saka » February 1st, 2017, 8:28 am

Wow. Nice article, I will put it on the wiki later. So how do I build patterns outside of golly?
Everyone, please stop posting B/S about CA
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: 2266
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X

Next

Return to Patterns

Who is online

Users browsing this forum: No registered users and 9 guests