Sample metapatterns made of Calcyman's metacells
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Sample metapatterns made of Calcyman's metacells
How about posting some patterns made out of Calcyman's stable metacells?
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
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
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
But how to tile them? I can't run Python scripts. Maybe someone could make a Lua sequel?
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
Can you explain exactly why you can't run Python scripts? Exactly what error text is displayed when you try?gameoflifemaniac wrote:But how to tile them? I can't run Python scripts. Maybe someone could make a Lua sequel?
(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?
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
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
The Python library does not have this symbol:
Py_InitModule4
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
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.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
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.
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
But... could someone post a Calcyman metapattern on this forum?
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
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.gameoflifemaniac wrote:But... could someone post a Calcyman metapattern on this forum?
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 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 522 times
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
When I try to run the script, it shows:
Can't find prebuilt megapixel ON cell.
Where should I place the megacell files?
Can't find prebuilt megapixel ON cell.
Where should I place the megacell files?
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
When I save the megacell files in the Scripts folder, it doesn't work.
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
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.gameoflifemaniac wrote:When I save the megacell files in the Scripts folder, it doesn't work.
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.
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.
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
It still shows the same error!
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
Oh, it works!!!!!!
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
Another problem! When I made a metapattern simulating the rule Just Friends, it behaved differently than the original.
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
I can simulate only Life and no other rules! The megapattern simulates Life, no matter what rule I will set Golly.
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
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.)gameoflifemaniac wrote:I can simulate only Life and no other rules!
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.
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 --
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
Thanks! You're a good friend!
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
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!
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...
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?
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...
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?
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
I'm very happy seeing the universal script. You are really a good friend!
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Sample metapatterns made of Calcyman's metacells
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)?
...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)?
I was so socially awkward in the past and it will haunt me for the rest of my life.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Sample metapatterns made of Calcyman's metacells
Crashed my computer @Converting pattern with a 16 x 16 box Is that supposed to happen (is 16 x 16 too big?)dvgrn wrote: Blahblahblah
Metafier universal.lua
Blahblahblah
Last edited by Saka on February 1st, 2017, 7:28 am, edited 1 time in total.
Re: Sample metapatterns made of Calcyman's metacells
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.Saka wrote: Crashed my computer @Converting pattern with a 16 x 16 box Is that supposed to happen (is 16 x 16 too big?)
What do you do with ill crystallographers? Take them to the mono-clinic!
Re: Sample metapatterns made of Calcyman's metacells
Please explain more about this, I'm interestedcalcyman wrote: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.Saka wrote: Crashed my computer @Converting pattern with a 16 x 16 box Is that supposed to happen (is 16 x 16 too big?)
Re: Sample metapatterns made of Calcyman's metacells
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).Saka wrote:Please explain more about this, I'm interested
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!
Re: Sample metapatterns made of Calcyman's metacells
Wow. Nice article, I will put it on the wiki later. So how do I build patterns outside of golly?