Optimizing Instructions in Opus Magnum

Optimizing Instructions in Opus Magnum

In my last post I talked about the 2022 Opus Magnum tournament. During the tournament, we had to optimize multiple different puzzles for instructions. That is hard to do! I promised to make a separate post devoted entirely to that concept, and here it is. This post will talk about Opus Magnum instruction optimization, its history, and the coolest solutions we know about. It will also go into the specific puzzles from the tournament, and show the winning solutions.

The Beginning

In November 2017, while Opus Magnum was still in early access, the developer added a new type of puzzle to the game. After beating the main campaign, the player earns access to “Fontenelle’s Alchemical Observations.”

Opus Magnum bonus content, now with an added challenge.

As the passage suggests, you must now solve puzzles within tiny production chambers, instead of the infinite sprawling space ordinarily available in the game. The first such puzzle is Silver Paint.

A “production” or “cabinet” puzzle, from Fontenelle’s chapter in the game.

The space is very restrictive, but the puzzle is also relatively simple. There are also “conduits” to teleport single atoms between chambers. Most importantly for this post though, there is a change to the scoring.

Instead of area, which doesn’t make much sense here anyway, the game scores you on “instructions.”

What Counts?

Much like cost, instructions can be counted without running the simulation. So all the questions you might have about what is and isn’t an instruction, can be demonstrated here.

Opus Magnum is very particular about counting instructions

Look at the “instrs” counter in the tray. With these 7 instructions placed, it counts 7. Arm 1 has three instructions and a no-op (which appears as a lighter color than the background), while arm 2 has four instructions. The no-op doesn’t count as an instruction, it’s a forced feature of how the game loops an instruction tape.

Repeats and resets are not efficient instructions. If you have to write a repeat, you might need to rethink your algorithm.

The “reset” and “repeat” macro-instructions are very punishing. They count the same as if you had placed all the instructions individually. With a 3 instruction “reset” and a 4 instruction “repeat” we add another 7, for 14.

Period override, the most misunderstood instruction in the game. It doesn’t even count as an instruction, you see.

The last thing worth clarifying, is the behavior of the period override instruction. This instruction does not count to the total. It’s primary purpose is that it allows your tapes to have more no-ops before looping. The situations where this is useful are very rare, but in the rest of this post, we may run into them.

Why optimize instructions?

What does it mean to optimize instructions in Opus Magnum? In what way are you making your solution “better”? A good first answer, is that the lower instruction count a solution has, the simpler that solution must be.

In information theory, the notion of Kolmogorov Complexity covers, roughly, how difficult is it to uniquely describe something. With respect to any given programming language, determining the Kolmogorov Complexity of some data, is the same as determining the shortest program which outputs that data. The shorter the program, the simpler the thing.

For many cases, the data itself is the best way already. Want to communicate the number 3? Just say 3. Want to communicate the phrase “knowledge is power”? Just say it.

But what about the number 777777777777777777777777777777777777777777? It’s probably not optimal to try to write it, or say it. It’s far more efficient to just say “42 sevens.” This is a number that can be compressed. It has lower Kolmogorov Complexity than other 42 digit numbers like 603514099621428383960135749283014642837433, even though the latter is a smaller number (and takes one fewer bit to write in binary!).

The important feature of the 42-sevens number, is its regularity. The shortest description takes advantage of that regularity. The same is true in Opus Magnum. Instruction optimization rewards taking advantage of regularity in the process.

The basics

First, let’s look at a simple solution to Silver Paint.

A solution to Silver Paint that I made today as an example. We can get the instructions much lower.
The same solution in the game’s UI, with most of the programming visible.

This doesn’t do anything specifically to optimize instructions. There are big repeat macros on the top 3 arms, the arms that make silver. Each of those expands to a dozen instructions. Over half of the 143 instructions come from repeats. The reason they exist, is that the output has 3 silver in it. The instructions only make one silver, so they need to run 3 times to make an output.

T

We have made what is called a “1T” solution. In simple terms, a solution is 1T if the code you wrote corresponds to one output. This is the most sensible way to many new players. Build thing, then loop.

There are other ways, however. The next most common is probably 6T, a solution where the code gets you all the way to the “you win” screen after the 6th output. Players make 6T solutions when they can’t loop, either due to some one-time initialization or other more cursed reasons. Clearly, when optimizing instructions, 1T is better than 6T.

Importantly, there is also fractional T. This is when the code runs multiple times in between every output made. For example, if we had a 1/3T solution to Silver Paint, then each tape loop would only be responsible for making one silver. That would save us a ton of instructions from the arms that currently have repeat macros.

The hard part of course, is that our output is not simply 3 silver. Any 1/3T solution will have to do something clever about the single water and salt per output.

Conditional logic

Baby's first Opus Magnum instructions optimization
A solution with much better instruction count, because it runs the tape 3 times between outputs (aka 1/3T).
The same solution, in the game’s UI. Arm 1’s programming not shown, but it is the same as in the 1T, without the repeats.

Here is a 1/3T solution to Silver Paint. This uses the exact same silver assembly as the basic 1T solution, but it doesn’t need to use repeats, immediately saving 72 instructions on the total. The center chamber has the same arms, but slightly different programming. The right chamber is completely different.

The center and right chambers now need to incorporate conditional logic into their programming. In other programming games, conditional logic is your “if” and “else” statements, flip flops and branching paths. In Opus Magnum those don’t really exist. But you can still find a way that the same instructions can bring about a different impact.

In the making a computer post, we used conditional logic for a situation where we didn’t know what the input was going to be. In fractional-T solutions like this, we use conditional logic for a different reason. We know exactly what the input is. But there are 3 loops between outputs, and we might be on the 1st loop, the 2nd loop, or the 3rd loop. The situation around each arm is different on each loop.

Let’s start with the right chamber.

Counting to 3

Our 1/3T solution needs exactly one water-salt input, every 3 times the instruction tape loops. The simplest way is to use an arm which takes 3 loops to fully reset. Both arms in the right chamber accomplish this, each in a different way.

Right chamber of the 1/3T Silver Paint

Arm 6 has two grabbers 180 degrees apart, and during its programming it rotates only once, for 60 degrees. This tactic lets you count to 3 using a bi-arm like this, but also count to 2 using a tri-arm, or count to 6 using a regular arm. Once the loop completes, the arm will be in a different position, leading to conditional behavior.

Arm 7, on the other hand, does reset its rotation. But it doesn’t reset its track position. It is on a track loop, and does a plus with no minus. It will have to run its instructions 3 times before it makes its way back to where it started, same as the bi-arm.

The goal of this chamber is to get water into the conduit quickly, and salt much later, enough so that all 3 silver can fit between them. But it still leaves a challenge for the middle chamber, to actually assemble this correctly.

Incomplete outputs and ghost atoms

Center chamber of the 1/3T Silver Paint

And that is exactly what arms 4 and 5 are doing. The first six instructions of arm 4 attempt to make an output using whatever material it has. It can’t know whether it has enough silver yet, so it has to try every time. Then if the output isn’t correct, it picks it back up and resets, one rotation away to make space for the next silver.

Arm 5 is the receiving arm of the counting-to-3 machine above. It can’t know whether there is an atom on the conduit or not, but it has to grab every time. And there are separate grabs for salt, and for water, due to the geometry of the output. When the arm grabs somewhere without “knowing” if there is anything there to grab, we say it is handling “ghost atoms.”

Silver Paint – summary

I obviously skipped a bit of headscratching and debugging that it took to build this solution. One thing you learn quickly if doing fractional-T solutions, timing is exceedingly tricky. If you go try to build your own solution to Silver Paint, maybe trying to break the record (which by the way, is a startling 39 instructions at 1/6T), you can run into all sorts of challenges unique to instruction optimization. But don’t give up! More tips are soon to follow, in the next chapter of our instructions journey. The Silver Paint worked example exists mostly to familiarize readers with what we are doing, and how we are talking about it.

Free space instructions

The game only scores instructions in the production chambers. But it’s definitely possible to optimize any puzzle for instructions, even the ones in the main campaign. For example, here is an 11 instruction 1/4T solution to Hair Product.

Not optimal instructions, but fun to watch and easy to understand

The instructions are no longer shown on the gif, but for small counts it is easy to just count them yourself, remembering the rules. For larger instruction counts, there are tools that will take a solution file and give you plenty of data from it. I use F43dit, an editor and solution parser developed by user F43nd1r, which confirms yes, this is in fact an 11 instruction solution.

F43dit (om.faendir.com) is a great external interface for working with Opus Magnum solution files

Tracks

Now, remember how we had an arm, on a triangle track, in our Silver Paint solution? This helped us do 1/3T. In a production cabinet, tracks can only be so long. But in open space, we can place a really absurdly long track loop. This would enable a 1/50T solution if we wanted it. Any arm that sits on a large track loop, advancing only once, can do the same action in many different places, with a very low instruction count.

This is the insight that let Rolamni completely break free space instructions back in January of 2018. With instructions still in its infancy, he posted this album. Every single puzzle in the campaign, with at most 4 instructions. Three example solutions are below.

3 instruction hangover cure, using 12 tracks.
Sometimes, Opus Magnum instructions optimization is remarkable, even with track loops in play
3 instruction stamina potion. Very obviously complicated, but possible. Made by Rolamni.
An example of a puzzle that requires 4 instructions. Since you can’t hold everything forever, there’s an extra shift after dropping here.

Every nontrivial puzzle requires a grab, an action, and a drop, just to move inputs off of the source and put the atoms somewhere. As it turns out, “advance on track” is an incredibly versatile instruction.

For certain puzzles, like Hangover Cure and Stamina Potion, those 3 are the only instructions you need. Everything else happens by letting those instructions play out on repeat across the entire track loop.

There are cases where 3 is not enough. The main challenge comes from not being able to let go of something in the grabbers, unless it is part of a complete output or consumed by a glyph. Rolamni figured out the detailed criteria where 3 isn’t sufficient, and then showed that one extra instruction (typically another advance on track after dropping) would make it possible. See Voltaic Coil above for an example with 4 instructions, necessary because you need bonds between atoms that can’t be simultaneously held in any possible arm.

Reactions

This stunned many players, and continues to do so for new players as they start to investigate the iceberg that is custom metrics. Someone comes to the discord, asks about optimizing for instructions, and we respond with the news. “No, you must have misunderstood, I don’t mean types of instructions or instructions per arm. I mean instructions total.” “Yes that is what we meant too.” 4 is a shockingly low number.

Now, this isn’t to say that the problem is trivial! Clearly, these solutions are complex, some of them frighteningly so. But their complexity was moved from programming, to layout. Instructions no longer really measured complexity. Instead, it was a relatively simple criterion to distinguish 3s from 4s, and then a long planning process to figure out the journey your busy single arm would take.

As a result, free space instructions didn’t become a popular metric. Between 2018 and 2020, it was regarded as “monotonous,” and while Rolamni was credited as a genius, people didn’t see much point in trying to make this style of solution to any new puzzles.

Swamp Fiber

In 2020, I attempted to breathe a little spark back into free space instructions. At the time, I was hosting the 2nd annual tournament. The 3rd puzzle I released was Swamp Fiber.

Swamp Fiber, from the 2020 Opus Magnum tournament. The top molecule is an infinite polymer, meaning it repeats 6 times and then has a “…”

I wanted one of the metrics to be a very close analogy to Kolmogorov Complexity, and I knew it couldn’t be just “instructions” because of Rolamni’s demonstration. Perhaps both instructions and cost needed to factor in. So I posed the metric “instructions + cost/5g.” I had tried this out once before, on a puzzle copied over from Spacechem. The metric felt like a decent match for Spacechem’s “symbols.” This would be its tournament debut.

This was my playtest solution:

My Swamp Fiber solve (nonscoring, because I made the puzzle, but it had the same “instructions + cost/5g” as the winner)

And this was BrotherMojo’s winning solution:

BrotherMojo’s winning solution for Swamp Fiber, at 39 instructions and 220g (39 + 220g/5g = 83)

Both of them had the exact same metric, 83. Mine at 40 instructions and 215g, BrotherMojo’s at 39 instructions and 220g. Both were 1/2T (with respect to the monomer from the infinite). This meant they built one Mors per instruction tape, and used conditional logic to make the elemental shell.

Other solutions that scored well, took a far different approach. I will link to the relevant timestamps in my results video. PentaPig had a 1/16T solution, with long track loops, 23 instructions and 320g for 87. Rolamni had an incredible 1/48T solution which didn’t even use any track loops, achieving 1/48T solely through conditionals and geometry. At 300g and 30 instructions, it scored 90. Shadowcluster got 90 using a technique that defies the notion of “T” completely, a design that eventually failed after making just enough product to complete.

Afterward

There was so much creativity and variation in these solutions, it felt like a great opportunity to expand instructions back into the main campaign. But this did not happen. After the 2020 Opus Magnum tournament, there was no big surge of interest in “instructions + cost/5g” optimization. The breakthrough would wait one more year..

April 2021

On April 19th, 2021, a couple weeks after the 2021 Opus Magnum tournament concluded, Steven posted the following gif to the discord.

It’s pretty, but it wasn’t built to be optimal at anything. Steven just likes when the machine go brrr.

Provided without any context, Steven seemed to just be doing his usual thing of “cursed funny ideas for how to solve puzzles and look cool.” However, Haxton quickly chimed in and responded “trackless 30I.”

As far as I can find, this is the first time that someone talked about trackless instructions and had a specific solution to show for it. Grimmy had mentioned in 2019 that trackless instructions could/should be a metric, but nobody actually shared any solutions then.

In the following days, trackless instructions gained quite a bit of traction.

Trackless Instructions: the new frontier

Username Void, Rolamni, and Grimmy began to optimize other free space campaign puzzles for instructions, but with the new restriction that tracks were simply banned. Two days later, a complete deluge of these “TI” solutions for campaign puzzles was flowing in the discord. And getting noticed by the prospective host of the 2022 Opus Magnum tournament as well!

Says the host of the next tourney

There was a significant amount of tech shared with production instructions, but also lots that was new. Let’s look at a few early TI solves, through the lens of production instructions.

Explosive Phial

6 instructions, no track. A very satisfying solution by Rolamni.

This is 6 instructions, 3 on each arm. The solution is 1/2T, and it manages the requisite “counting to 2” using a tri-arm that takes 2 loops to get back into position. The geometry works out nicely to reuse the tri-arm for input and output.

What’s new, is how much space we get to use. There are no cabinets in Fontenelle’s where you could rotate a length-3 multiarm. Even getting to place 3 triplex bonding glyphs, for a puzzle this simple, is absolute luxury. TI feels good.

Water Purifier

An example of building multiple outputs on repeat, using tech that is pretty much unique to TI. Framecount reduced for embed.

Whoa, new tech! Building 6 products at once. There’s basically never room for that idea in Fontenelle’s cabinets.

It’s adding one salt per tape loop, but to 6 different waters in a big wheel arm. Input suppression ensures that water centers are only taken when necessary. This manages to solve in 9 instructions. Note the little arm hidden in the shadow of the wheel, which does a grab-pivot-drop. The pivot has to happen in only one place so that the wheels pivot net 1 time as they go around the wheel.

Very Dark Thread

Not everything was so clean. Some puzzles refused to be solved elegantly. Here was an early 25 trackless instruction solution to the notorious Very Dark Thread, a 1/6T contraption by Rolamni.

It’s important to show some struggles, to appreciate just how difficult this metric is.

However, a bit of refinement later, and he posted a large improvement to 19.

Rolamni’s much cleaner solution to that problem, using an arm that counts to six “backwards”

This metric was scary. You could make a well balanced solution that looks good, and then some other totally mystical solution is several points better. By the time you get to a complicated puzzle like Very Dark Thread, there was no safe guess as to what minimum trackless instructions would be. Reusing arms, reusing motion, alternate processes, all make estimation nearly impossible.

Leaderboards

By May 9th, two weeks later, TI was officially added to the list of metrics supported by the leaderboard bot, maintained by F43nd1r. Players could now go hog wild competing against the best solutions known, on this new frontier.

Working forwards, not backwards

As these solutions gained popularity, a few people sought to answer the question “just how much is possible in a low trackless instruction count?” Without intending to specifically solve any one puzzle or another, people would just throw stuff at the board, put in a small number of instructions, and see what it did.

What came out were some of the craziest TI solves ever seen.

Purified Gold

In July, Zorflax made a solution to purified gold that was definitely not a TI record. The existing record was 13 instructions, made by Rolamni. What was bizarre about Zorflax’s new design, was its irregularity. This beast seems like it might be symmetric about its center, and the arms are, but the glyphs are not. According to Zorflax, he settled on an arrangement of arms, and then just rotated the glyphs randomly until it worked. It makes exactly 7 gold before clogging up and never outputting again. It doesn’t crash, but all the arms have incompatible metal in too many places so it just sits there moving metal in circles forever.

“Metal Chaos,” a solution by Zorflax. The gif does not show a loop because the eventual looping behavior of this solution doesn’t make any outputs. Instead, it makes 7 outputs before settling into steady state, which is a clogged machine that doesn’t make anything. The gif shows one.

Viability?

A couple months later, Zorflax began to take an interest in TI. He remembered this solution and tinkered with its reduced 4 arm form, checking a bunch of combinations of rotate order, rotate direction, and glyph orientation. All he needed was for one combination to make at least 6 outputs before clogging. In his words, “If there was no way to predict how the metals would purify, then how could there ever be a way to rule out a machine like this actually working?”

He spent around 40 hours tinkering before breaking through. On the 12th of October, he shared this video. Warning, it is 23 minutes long.

Metal Chaos, now as a TI record

At 12 instructions, this was a new record. It also demolished the idea of carefully building out a solution concept starting from its fractional T value. Instead, it gave into the chaos, trusted the process, and emerged victorious. There are internal 5-repeat and 13-repeat loops conveying metal around, and the right two metals end up in the right place often enough before it succumbs to congestion.

Computer assistance

Inspired, GuiltyBystander wrote a computer program to enumerate layouts. After enumerating 30 million layouts, it found 2 successes. The first one was the same as Zorflax. The second was much faster, with a total runtime of 3762 cycles. So, we had a new record. GuiltyBystander began enumerating 3 arm layouts with 9 instructions, to see if it could work. So far, it hasn’t.

Zorflax prevails

That same week, Zorflax manually found a 3 arm layout, but with 11 instructions.

Metal, hold the chaos. Somehow this algorithm actually makes sense. One arm only holds lead and copper, one tin and silver, one iron and gold.

The much slower shuffling of the bottom arm allowed the solution to have its loops more spread out. This solution wasn’t even chaotic, it looped properly and ran forever. But never fear, there was one more trick up Zorflax’s mad scientist sleeve, mere minutes later.

At first, you might think this is the previous solution but better. But as the cycle count suggests, it starts to get a little funky. Chaos returns to set the record once more.

This is where the record stands today, at 10 instructions. The two-rotates-back being done by the simple arm in the 11, could be achieved by one-rotate-forward of a bi-arm. The cost however, was that it now shuffled quicker, enough quicker to bring back the chaos. This solution makes exactly 7 gold, the same as the original beast.

Blood-Stanching Powder

Blood-Stanching Powder is a large molecule from the journal. On October 22nd, the TI record of 25 instructions looked like this:

The 25 instruction solution to Blood-Stanching Powder, that was the record at one point. This record was improved. Try to guess by how much.

GuiltyBystander and Zorflax were playing around with “what bond patterns can you make with 6 instructions on two arms.” They found a couple different two-arm combinations which could build this spoked wheel idea. Noticing the similarity to Blood-Stanching powder, Zorflax quickly adapted the 25 to a 22.

Then we all took to the task of finding a more elegant way to combine the halves, as they came out of these new 6 instruction factories. One factory in particular seemed able to make two halves in parallel at a very convenient offset. In a matter of hours, the record fell from 25, to 22, to 16, to 15, to 13, to 12, all the way down to 10.

I present, the most surprising TI record to date.

In my opinion, the best Opus Magnum instructions solution
One of my favorite solutions of all time

This was a collaborative effort between GuiltyBystander, Zorflax, Username Void, and myself. I truly believe nobody could work backwards from the product and arrive at this solution. You don’t look at the 18 atom output and think “1/24T makes sense here let me try it.” No, this is a triumph of the forwards-first design approach, which strikes gold randomly and without warning. That isn’t to say that all 3 arms were just thrown at the board and got lucky. The specific pair of arms on the left were chosen among the candidates because the halves were built with the opening facing the right direction. The arm on the right is a conditional arm that has its grab point in the correct place. The fact that it could be a single arm took several people’s insights combined.

What this does show, yet again, is just how impossible it is to predict instruction minima.

Surrender Flare

This post is getting long, and I worry that I haven’t even started talking about the tournament puzzles. But I would be remiss if I didn’t bring up the beautiful 9 instruction solution to Surrender Flare. Found by Zorflax, this is another forwards-first design, this one with a nonsensical 3/22T statistic.

Another beautiful creation by Zorflax. Apparently he made this in an afternoon, only worrying about whether things would crash into quicksilver.

I find it fascinating the way it progresses so cleanly through different phases of the process, patiently rearranging three flares onto each others’ salts, without ever needing more than 9 instructions.

Tournament Puzzles

In 2022, the tournament included two trackless instructions puzzles. Technically, Bist posed it as “tracks + instructions,” to remove the barrier for entry. However, every competitive entry was completely trackless. Unlike “instructions + cost/5g” where both portions of the sum were equally viable ways to gain or reduce complexity, there was just no strong benefit to placing track in T+I.

And so, we had two chances to try to replicate this dark magic, all by ourselves. Finally, we get back to the part of this post that is about actually optimizing instructions, and not just marveling at possibility.

Film Crystal

My first solution to Film Crystal had 25 instructions.

It was time to compete. Here is where my solution progression started, at 25 instructions and 1/6T.

On the top left, is a forwards-first design motif I had figured out long ago. With a thin multi-atom reagent, it is possible to separate it into dropped-atom, and waste-stick in only 4 instructions. The rest needed more planning. At 1/6T, each loop needed to do the following:

  • Obtain one silver (here, by grabbing one copper and one quicksilver and combining them with projection)
  • Obtain one salt+air input
  • Add the 3 atoms to the growing product
  • Attempt to output, put it back in the right place if not

Since the salt-air inputs had to be in different orientations on odd or even tape loops, it seemed like a good idea to use two tri-arms. One would grab on odd tape loops, the other on even tape loops, allowing the triangle to come out differently. Adding a pivot to one of them allowed the shapes to converge.

The output arm needed access to two spots on the partial product that were offset by one triangle, so that it could help advance the assembly. Two corners are 2 hexes apart, so a length-2 arm made the most sense. After fighting with geometry a bit to avoid collisions, I had the design above.

Improvements

A first solution is just a starting point. Wary of Blood-Stanching Powder’s 25 that sat as the record only to turn into a 10 within a day, I did not want to miss a huge find. If someone was going to run away with all the points on this puzzle, it was going to be me. So I may have no-life’d it a bit.

My second design, now at 21 instructions with a completely different assembly.

What if I put that waste stick to good use?

The reason for 2 tri-arms in the original design, was that the two silver were at different distances from the center of the crystal. You could not map one silver onto the other by rotating around the hole in the middle. But there was a rotation that could, coming from the outside of the crystal. Obviously it couldn’t map every silver to every other, but it could make the knight’s move offset needed. So my plan changed to the following:

  • Make triangles of silver-air-air and silver-air-salt
  • Rotate them at a knight’s move from the silver, to make 1/3 of the product, held from the outside
  • Pass those onto a ring building station, fix up bonds and calcify the missing salt
  • Use the same arm that delivered thirds to the station, to output once the ring is complete

Down to 21 instructions.

Forward-first silver building

This knight’s move rotation (small tri-arm in the gif above) was very convenient. Not only did it make the difficult offset between silvers, it let you hold onto what you were building from a direction conducive to making the ring. I just needed to find a way to do this in fewer arms. The breakthrough happened when I started playing with one arm holding two reagents.

Very familiar inputs becoming a very familiar output, in only 7 instructions.

This did what I had 13 instructions accomplishing before, now in only 7. Goodbye slappy stick, hello impossibly elegant assembly.

Confidence

15 instructions, my submitted solution.

By this point, every arm could justify its existence, and I saw nothing I could improve. I had a suspicion that maybe the piston wasn’t the cleanest way to be reorienting the product (after all, if you could put an am in the hole in the middle, it would be able to rotate it in only 3 instructions. But, consider what happens when the ring is complete…)

I thought 13 was definitely the lower limit, and 15 was my hard earned solution. Before any actual numbers were revealed, I teased in discord “if you can take more than 2 TI off my solution, I’ll eat a tissue.”

I couldn’t rule out complete unspeakable magic, because after all, this is TI. Which is why it made me curious, when Zorflax posed a bet.

Ok Zorflax I hear ya. Hope this doesn’t turn out poorly for you..

What might I have missed? All of my solutions were 1/6T, all of my solutions used projection and not purification. There were definitely parts of solution space that I didn’t explore. Everyone was bound to have some blind spots when working solo.

Results

As it turns out, many big names had built 1/18T solutions that used purification and not projection. This had some advantages and some disadvantages. Like in the purified gold solves, purification is patient, it won’t fire until output is unblocked. A 6-arm feeding metal into purification will just loop things back over the input, allowing silver to be made in 3 instructions at 1/18T. But it did not make assembly any easier. And my method had 4 instructions to both make silver, and get a head start on assembly.

Among the people who had 1/18T purification solves were Zorflax, Rolamni and PentaPig. Zorflax was one of the 5 people on commentary in the results video. As we revealed more and more solutions, Zorflax was increasingly shaken. Maybe 1/18T purification wasn’t the winning approach after all, and maybe his implementation of it was missing something.

Both turned out to be true.

Zorflax’s solution had 23 instructions building the product in thirds. PentaPig and Rolamni both had near-identical 18 instruction solutions, using a simpler triangle-based method of assembly. PentaPig had a cost savings that Rolamni missed, leaving Rolamni 3rd and PentaPig 2nd. PentaPig’s solution is shown below.

A beautiful 18 instruction solution from PentaPig, featuring 1/18T and arm reuse.

Analysis

My 15 instruction solution won, by a margin of 3 instructions. Trying to come up with an explanation that doesn’t involve luck, I think I can attribute it to two things.

First, a lot of top players tend to approach instructions with the mindset “the lower I can get T, the better.” This is not necessarily true. Reducing T is only useful so long as it takes advantage of more regularity within the output. 1/6T is the smallest value I could truly justify using, especially with the existence of clean ways to use quicksilver for projection.

And that leads to the second part of my explanation. I don’t know if many people found either of the two clean ways that I did, to use quicksilver. The slappy stick and the double-reagent arm both were forward-first experimentation, whose results happened to fill an important role in the solution once successful. I continuously believed “there’s some magic that I need to find,” and put down combinations of arms and glyphs and instructions hoping to find it. It only takes a few powerful motifs to radically simplify a problem.

Zorflax, being a man of his word, did in fact eat 7 tissues, many during the results stream itself.

Radio Receivers

The other “tracks + instructions” puzzle in the tournament was Radio Receivers. This will comprise the rest of the post, so if you are named Zorflax, didn’t participate in the end of the tournament, and want to try this puzzle for yourself later on, here’s where you save the tab and come back later. For the rest of you, read on!

Perhaps an easy puzzle. Perhaps not. The center atom being copper on the top product and not iron really throws off the regularity.

Far less conducive to fractional-T. How the heck were we to make this one work? However, I looked at the input, and my eyes lit up. We had another thin, multi-atom, consumable molecule. Slappy stick might get to have its day in the spotlight after all.

Seeing no better place to start, I built a purification slappy-stick machine.

Testing some forwards-first ideas involving far too much quicksilver

At 10 instructions, it was able to make each individual atom that appeared in the output. But it had the wrong amount of them, so this was going to definitely leave waste and be a headache. By the time I turned this into a solution, that solution had 37 instructions, and was so confusing that I am not going to include it in this post. I had a suspicion that I was barking up the wrong tree.

Something different you say? But what if we keep using slappy stick

In my stubborn insistence, I determined my next approach should do the exact same thing, but using projection instead of purification. That very quickly provided me with a 24 instruction solution.

24 instructions, building two connected outputs and a lot of waste from 12 inputs.

By changing the stick to have quicksilver be the held atom, I could make iron-quicksilver pairs very easily. Going from those to outputs, took less effort. Here, the tin waste served another purpose as well. My 1/6T contraption ended up making a 12 atom brick, only 8 of which were usable product. The other 4 could be safely whisked away by the tin stick after solving a relatively simple geometry problem.

We were not finished. It was time to look for some additional forward-first wizardry within this setup.

Something truly bizarre

Not a solution, but a very interesting find. This funky 12-atom growth is so easy to build and to modify, that we might benefit by building the output from it.

What happens if I just connect things back to the stick? Well, I found a geometry where they connect in threes. Where I had previously used a piston, a 6-counting arm, and a fair few instructions to achieve grouping by threes, this did so naturally.

The first four-atom molecule to hit the long tri-arm makes it all the way to the stick. The next two are interrupted by the first one, which is now on a bonder and whisks them away. This repeats at exactly the same cadence as copper is generated, leading to a 1/6T idea with potentially fewer instructions.

Now, it takes some familiarity with Rolamni’s 3i and 4i rearrangements, to see this as specifically promising. But I did have that..

Free real estate

I had established a conveyor belt for molecular bricks. At the cost of no additional instructions, I could do as many actions as I wanted on those bricks, as they moved one tile further every tape loop.

This is less powerful than enormous track loops, since the motion is required to be in one direction. But it is powerful nonetheless. Powerful enough to highlight yet another difference between an instructions metric, and the underlying concept of complexity. I added a lot of bonders to my solution, making it more complex without costing any instructions. Eventually I had something that could be completed in 24 instructions, tying my existing best.

24 instructions again, but with the new approach.

I knew I could go lower, and I decided to get rid of the littler arm moving quicksilver. Sure it’s only using 3 instructions to do a necessary task, but it cannot possibly multitask, and arms later on in the pipeline can.

Final form

With a 22 and a 21 instruction solution in between, I ultimately crafted the following, at 20 instructions.

20 instructions, now my final submission.

The left 3 arms had 12 instructions, that I had committed to from very early on. The best solution I had for the rest of the puzzle, took only 8.

Even more so than Film Crystal, I knew I had tunneled hard into one very specific corner of solution space. But in Film Crystal, that had been the right call. And 20 was a small number, maybe small enough to win. I was in my element, rearranging a brick in the most efficient way I could find.

Results

The list of submitters had thinned a bit by this late in the tournament. However, the top included several familiar names. Rolamni in 5th with a very unique approach, notgreat in 4th with a much more clean one, had 27 instructions apiece. Bist’s playtest solution was 26 instructions, which is part of the reason she thought it would make for good competition. There was at least some elegant 1/6T way of doing it, that she identified before sentencing us to try it ourselves.

The best implementation of Bist’s playtest algorithm was 25 instructions, by F43nd1r in 3rd place. It takes 7 inputs to make the outputs minimally, so the algorithm has one arm take the input every loop, and another arm only take the input on a 6-counter. That material can be routed pretty elegantly to the two different halves.

F43nd1r’s 25 instruction solution in 3rd place.

This just left PentaPig and me. The same top 2 as the previous puzzle, and quite a few instructions still to drop to get to me. On stream, Bist revealed PentaPig in 2nd, with 24. His solve bonded a chunk of material together, similar to my earlier 24, and broke it apart into two outputs. It used 10 inputs to make 2 outputs at 1/6T, where mine took 12. The excess was small enough that it cleaned up nicely after itself, using the glyph of disposal.

PentaPig’s 24 instruction solution in 2nd place.

But of course, that means I won. By a wide margin once again, proportionally the same 5 to 6 ratio as Film Crystal. For as much as I was afraid of the impact of new instructions metrics on tournament points, I was the person setting the curve and getting all the benefit from it.

Analysis

What can be said about instruction optimization as a result of these wins? What am I doing differently? Clearly in both cases, there was some feature of my solution that nobody else did. For Radio Receivers, everyone was using 1/6T more or less (Rolamni being a notable exception), but we used different numbers of inputs. I would like to say that forwards-first benefitted me again, but the results videos are full of solutions that seemed like they had good initial ideas, and took a ton of complexity to finalize their details. So, forwards-first only works, if you can judge from a distance whether an idea is useful.

I have always thought slappy-stick was one of the most powerful motifs, and it paid off. It gives so many simultaneous benefits:

  • Move across multiple glyphs for free, similar to the track loop instruction solves
  • Handle arbitrary amounts of waste
  • Since it flips between two positions, timed grabs will only handle atoms if they leave the stick

Sure it’s bad for area, but we are not in Fontenelle’s anymore. You can use as much as you want. So, I deemed this the most promising starting point, and was able to build out a strong solution from it. At each step of the way, I made the newly added arms justify their existence. The small arm for quicksilver made sense initially, but could not outcompete a multitasking hex arm later on.

Can I expect others to have success with the same? I have no idea. Despite these wins, I don’t even know if I trust myself to have success taking on a new TI puzzle in the same way. Every complex puzzle is different on this metric. To attempt to find a polished solution in a tournament time scale, but then need to bodge something together in 10 minutes when nothing ever came together, is a risk. Zorflax did say, through his mouthful of tissues, that TI puzzles are won and lost on the conceptual phase.

I think that trackless instructions competition is one of the most fascinating things the Opus Magnum community has ever done with this game. I hope you enjoyed this long post about it. I’ll see you next time for a writeup about 2022’s computation puzzle. The metric was not TI, but I built a TI solve for it anyway.