Reaching Long-Awaited Perfection on Opus Magnum’s Final Level

Reaching Long-Awaited Perfection on Opus Magnum’s Final Level

It’s an exciting day. The 21st of September is already celebrated by fans of Earth, Wind and Fire, including the inaugural Opus Magnum tournament‘s host RP0 who included a themed puzzle called “Do you Remember”. But now it will also live as an anniversary within the Opus Magnum community. Because today, September 21, 2024, approaching 7 years after the release of Opus Magnum, the player Artem quietly uploaded the gif below to discord.

This is a big deal. The story of why it’s a big deal, is certainly not short. Welcome to biggieblog, where you’ll get the whole thing.

Opus Magnum’s Main Campaign

Over the 7 year history of this game, the community has spent a good chunk of its focus on custom puzzles made by community members. These are how we host tournaments where the players are all seeing a challenge for the first time. Often the designer makes a puzzle with particular design goals in mind, e.g. the cost hell that was Latch-Hook Fireworks.

But most players aren’t involved with these tournaments. For most players, the set of puzzles included in the main campaign makes up the entirety of their experience with the game. These are 36 puzzles across 5 chapters, telling the story of Anataeus Vaya, Concordia Lem, and warring alchemical houses.

The puzzles roughly increase in complexity and in difficulty, culminating in Universal Solvent. By making a machine which completes Universal Solvent, players get to see the final scene. The protagonists escape unharmed. Congratulations, you beat the game! By doing so, you join the top 14.6% of people on steam to have played Opus Magnum.

What is in that final puzzle anyway?

Universal Solvent

Certainly the most complex puzzle in the campaign, Universal Solvent has the player build a large symmetric crystal, the construction of which requires using nearly every glyph in the game.

In the center is an atom of tin, which requires putting two lead into the glyph of purification. Bonded to the tin in each direction are the two atoms, vitae and mors, produced by the glyph of animismus. Completing a ring around that are one copy of each cardinal element. Cardinal elements require the aid of Van Berlo’s wheel, a single-instance part that serves to power the glyph of duplication. Finally the whole thing is surrounded by 6 salt.

It’s the “everything puzzle”.

Merit of Complexity

Now, I feel the need to draw a distinction between complexity and difficulty. More complex puzzles exist. One such puzzle, the “everything puzzle” of the journal, is Universal Compound. Its name is remarkably similar. Its appearance is remarkably similar. Due to including the journal-only atom of Quintessence in its center, one might argue it to be even more complex:

But despite this, Universal Compound is widely regarded to be an easy puzzle. Because when the community talks about difficulty, we mean difficulty in optimizing the puzzle to its limits. In this case, the limits are the cycle optimization limits.

When trying to get the cycle count low on a puzzle, we sometimes need to build complicated machines. Some of us build machines that are insane enough to warrant an entire blueprint before building, and a whole dissertation after building. To compare the difficulty of Universal Solvent to Universal Compound, compare the gif posted at the top of this post, to the cycle-optimal machine below:

The cycle count of 194 is minimal, because the entire puzzle is limited by the single salt source. Since it takes 2 cycles to add one salt to the board, and 16 salt to complete a product, the time required to make 6 products is 192 cycles + latency. Getting the latency to its lowest value by placing the final salt immediately on a bonder with an otherwise-complete product, then moving the assembly directly to output, nets you 194.

What’s the corresponding limit of Universal Solvent?

Theory

Looking at the set of reagents for Universal Solvent, we get a whopping 5 inputs. This is unusually many, so much so that you couldn’t build this puzzle in game. The custom puzzle editor actually limits you to 4 inputs. This completely changes the bottleneck, as now you can get material onto the board frighteningly quickly.

If we ignore the center, everything else takes 12 salt atoms to build. With 4 sources of salt, a machine can add 4 salt atoms to the board every 2 cycles, or 12 every 6 cycles. The metal in the center can be built slightly more quickly than this, so our limiting process is indeed the salt.

A machine that builds one Universal Solvent every 6 cycles is already going to be significantly more complex than the Universal Compound solution shown previously. It’s a challenging pace to keep up!

Then we have the matter of latency. Oh boy do we have the matter of latency.

The Matter of Latency

Similar to Universal Compound, the outermost salts of Universal Solvent are very easy to add to an otherwise complete product. In a perfect world, when you moved a set of salts on cycle 36, they would all bond onto your 6th product, the entire assembly would snap over to output, and you would drop it then and there to achieve a 38 cycle machine.

But how in the hell do you have your 6th product otherwise complete at that time?

Working backwards, you need to do something with the previous 4 salt too. There are 6 atoms of salt in the 6th output, but 4 + 4 = 8. So counting the last two sets of salt inputs, at least two atoms need a different job. And every other job in the 6th product is extremely convoluted. To use salt to make anything other than salt in an output, involves interacting with Van Berlo’s wheel, or the glyph of animismus.

This being a very daunting challenge, people have approached it differently over the years. It suffices to say that 38 was the theoretical minimum, but the record remained quite far from 38. I think I’ve said enough on the theory for us to appreciate some of the historical solutions. It’s time to go back in time.

Every 6 Cycles

The first solution I can track down that produces an output every 6 cycles, is the following by thomastc:

With a redesign, they were able to bring it down to 49 cycles before the end of October 2017.

On Halloween 2017, two weeks after the game went into early access, this 49 by thomastc was the best solution uploaded to the “Cycle Count Leaderboards” thread on reddit.

It has a pretty good division of labor. Two of the salt sources are on the left edge making halves of the ring in the middle. After joining the halves and a tin into a complete core, the product gets its final 6 salt added via two assembly stations on the right.

Unfortunately for latency, the rightmost salt stations have a huge initial delay. It’s useless to grab those atoms until the corresponding core is in place. So although the gif shows a nice looping steady state, at the start of this machine there is a lot of downtime spent waiting for the first core to come together.

44

A month later, towards the end of November 2017, someone finally shared a machine with lower cycles than thomastc’s 49. And it was quite a bit lower. Here’s 44 by MattLeCrack:

Same division of labor, but much more fluid layout. The Van Berlo wheel in the lower left is constantly spinning, which both looks beautiful and also helps with the awkward pairing of cardinal atoms in the product. The core flies together, and its two missing bonds are done in parallel while it spends the two cycles on the salt bonding stations. In general, I consider this to be the first strong cycles record to Universal Solvent.

This gif also came after the (much needed) color palette fix on the exported gifs, causing red and green to look more as they do in game. This happened alongside a balance patch in which pistons were made more expensive. MattLeCrack’s solution didn’t use any, but the previous solutions by thomastc did. In the top right corner of the gif, a diamond symbol indicates that a gif was recorded after that patch.

On December 7, 2017, the day that Opus Magnum left early access, MattLeCrack’s 44 was the cycle record.

43 and a New Division of Labor

The previous solutions opted to make the cores from two inputs and the salt spikes from the other two. A player known by S6l20, made a different choice. This helped them achieve the first 43 cycle solution, uploaded on January 4, 2018.

The bars in yellow are each made by a single salt source (the central one also uses the lead source). The final three salt come from the other salt source. Bonding the product together in layers, largely eschewing its rotational symmetry, made certain aspects of layout easier.

Here is S6l20’s 43 cycle solution which stood as the record for a couple of weeks in early 2018:

42 and Creative Tactics

I do enter this story, and what better point to make my entrance than at my favorite number.

I hadn’t really developed the skill yet to lay things out for low latency. My skill has always been about creativity in how I break down the puzzle in the first place. In order to lower the record on Universal Solvent, I applied a tactic that I had been making use of on harder journal puzzles already: the Odd One Out pipeline.

Odd One Out pipeline

As the name suggests, a solution with an Odd One Out pipeline is designed to make most of its outputs in a “normal” pipeline, and one extra output some other way. Typically one uses an odd-one-out pipeline to slowly assemble an extra product using spare material that the main pipeline cannot use. Because the game counts the time to 6 products, dropping the Odd One sometime before the 5th output of the normal pipeline, is sufficient to speed the cycle score up.

Every machine shown in the historical progression has been building an output every 6 cycles. This uses all of the salt inputs at maximum speed. Thus there is no spare material here in steady state, so one might see no point to an Odd One Out pipeline.

However, there is some spare material at the start. MattLeCrack’s 44, although slick, still has the exact same problem as the 49 before it. The salt at the final stations has a large initial delay waiting for the cores to get there. I could grab 4 extra salt (2 each) and hoard them on the board somewhere, and it would still be a 44. What I figured out, was that if I

  • delay all of the machinery in MattLeCrack’s 44 by 4 cycles
  • take 2 atoms from every source during those 4 cycles
  • take 2 additional salt from the rightmost two sources while the first core is assembled
  • use the resulting 12 salt and 2 lead to build a single output
  • drop it before the 5th output of the original pipeline

Then I sacrifice 4 cycles up front to save 6 cycles in the end. That’s 42.

Implementation

It’s kind of a monster. A huge jump upward in price compared to the one before it, and starting to require a lot of language to explain and justify. But, it was the first 42 to be uploaded!

41 and the Last Simple Solution

It turns out, a single pipeline solution outputting every 6 cycles could have also hit 42. It could even hit 41. My record fell 2 weeks later on February 1st 2018, to a player known as Demios_.

The assignment of atoms resembles the one S6l20 chose. Every input is busy from the beginning, and salt spikes accompany the cardinal elements they are attached to. The one most challenging atom to place is definitely the salt that has to travel over the output glyph and join up with vitae.

Seriously, the fact that this clearly-6-fold-symmetric product has to be made as four groups of three in some perverse way, means that nothing is ever easy. With no prior solution standing for a full month, Demios_’s 41 would stand for the rest of 2018.

Honorable Mention: Vandalite

It’s not entirely out of the question that a 40 cycle solution could be made using a single pipeline. A player known as Vandalite did have paper notes where they showed what would happen on each cycle in order to make a first output on cycle 10. Following it up at an output every 6 cycles, would mean a 6th output on cycle 40. At the time they wrote these notes, they believed 40 to be the minimum cycle count.

Early on in the game, Vandalite was able to achieve many great cycles scores, but this 40 remained out of reach. When I tried at one point to implement it from this blueprint, the Van Berlo wheel was just completely horrible to work with. It turns out, placing a big clunky 7 atom object with collision in the middle of a fast moving solution that wants to touch it on all sides.. sucks!

PentaPig, Surgery, and 40

January 7th 2019, a couple days into the first tournament, PentaPig posted the following link in discord. With it, he said “Original design. It’s more than just a 42.”

It’s hard to tell from the gif, but all of the salt sources in this machine have a 2 cycle initial delay. PentaPig was able to make a machine whose limiting atom was the tin, rather than the salt.

One thing that differentiated this design from its predecessors was that it made the vitae and mors using salt from two different sources. This is something that makes little sense to do if the whole thing is waiting on tin anyway, but when tin comes out a little bit earlier then it helps the center come together.

So, how would one turn this into a 40? Definitely it’s possible to do something like my Odd One Out tactic, and take salt from every source ahead of time. But because every source is equally delayed, there’s actually a much slicker tactic, known as surgery.

To finish out the 40, PentaPig built the first product using a lead center instead of a tin center. Every following product could have tin early enough to operate correctly, but the first one was defective. It needed an extra lead, which the puzzle does have to spare. Fixing that defect off to the side with “poorly optimized solvent surgery”, PentaPig uploaded the first ever 40:

Surgery vs Odd One Out

It’s kind of pedantic of me to even differentiate these two tactics from each other, but I think there is a reason. In surgery, the incomplete product passes through all of the ordinary pipeline’s machinery first. After it reaches the output glyph, the extra steps happen.

In Odd One Out, the extra material never touches the ordinary pipeline’s machinery. It goes on a completely separate journey, instead of the same journey with an extra detour afterward.

When PentaPig coined the term surgery, it definitely added a new tool to the dedicated cycle optimizer’s toolbox. We could make use of all of our well-laid-out machinery even if there was going to be some defect at the end. With more convenient designs, we had more room to squeeze performance out of what we built.

Fittingly, PentaPig went on to become the most decorated Opus Magnum tournament player, winning 3 of the 6 tournaments to date. He has creativity, precision, and no weak metrics.

Two-Stage Designs

In May 2020, I took a look at the journal, which contains official extra levels beyond the main campaign. There were a few puzzles I had been avoiding. One of those, Vaporous Solvent, had a cycle record of 76 despite the theory limit being 75.

Within a day, I had built the following solution:

The input has no downtime, but it clearly has two different phases. For 36 cycles, 18 inputs are chained together in a right-moving block. Then for 36 cycles, the resulting pinwheels are turned into 6 outputs.

This was the first 75 cycle solution, and while time has once again shown that the thing I built was more complicated than it needed to be, I still think this is a great demonstration of a Tactic. Sometimes, it is advantageous to do things in phases. Specifically, when considering latency, only the latency of the last stage matters. The first stage gets an enormous amount of spare latency to do things like duplicating from Berlo, reshaping and repositioning.

Number + Number

Vaporous Solvent is much slower than Universal Solvent, allowing 12 cycles per product at top speed. I would refer to the two phase design shown above as a 6 + 6 solution. On the right, a pinwheel core is made every 6 cycles, until enough have been made to complete the puzzle. Then on the left, the cores are assembled into outputs, again every 6 cycles.

By referring to the design as 6 + 6, I am telling myself that each section of the machine should be capable of handling its task on a 6 cycle repeat. 6 is pretty forgiving for simple tasks.

Now let’s consider Universal Solvent. The top speed allows 6 cycles per product. The only realistic two-stage plans are 4 + 2 and 3 + 3. A crazy three-stage plan with 2 + 2 + 2 is also technically feasible.

2 is not a forgiving number. But, by doing multiple stages, we buy an enormous amount of spare latency for the cores. We can do what theory asks us to do, and put our last salts directly onto a bonder connecting to an otherwise-complete product.

39

I made a bold prediction the day after making the new Vaporous Solvent cycle record. I predicted that Universal Solvent would hit 39 cycles before the end of the month. It was already May 21st.

I felt so confident that a two-stage approach with 4 + 2 would fix the latency problem, and I dove right in.

There are a few strategies necessary to be able to handle large objects every 2 cycles. Regrabs are extremely costly, so wherever possible it is far more valuable to hand things off by forming bonds, even while potentially breaking others. This is exemplified by the piston in the middle of the gif above. The lead it is holding doesn’t belong to any product, but by rotating between bonder and unbonder every other cycle, it successfully conveys all 6 partial products onto the final assembly station 2 cycles apart from each other.

We also need a way for the arms that deliver the products onto the output glyph not to crash into each other. This is done by having most outputs be delivered using a track loop that advances one more time before dropping, avoiding the fatal “rotate, drop” combination that blocks the next arm base from the necessary hex. For the final output, which cannot afford any extra latency, a specialized arm takes care of it.

This gif spurred on my confidence and I kept plugging away, trying to make those cores appear in the right place at the right time.

By this point my target had shifted to 38, which is why I had all initial delays in my build calibrated to a 38 cycle final score. But the puzzle was still “Solvent Test Ground” which was a custom puzzle (made in an external editor where having this many inputs was possible).

Frustrating Reality

As I worked further and further backwards, I was dreading integrating Van Berlo’s wheel into this design. At a 4 cycle repeat, it was going to be much more awkward. All of the previous designs had 6 cycles between products, meaning the wheel could spin all of the way around.

As I read back through the discord message history, I can see that my momentum just crashes into a wall. Nothing with Van Berlo actually works. A few days in, I give up on trying to build it into the second stage designs I’ve already made, and just see what kind of first stage I can get to work.

It’s trying to make the same preparations for stage 2. The salt inputs are all towards the top. There’s an extra lead set aside to do the magic wand movement. It does build the cores at the proper rate, using the only Berlo strategy that had any hope at all. But as Grimmy and I discuss, it’s pretty far from perfect.

Grimmy

So I know I have featured Grimmy in these chat logs in the role of “peanut gallery”. But they truly are a talented cycles optimizer. It’s just part of the reality of these extraordinarily complex machines, that getting anyone at all to follow along well enough to contribute is a tall order.

Throughout my long history with this game, Grimmy has always been one of the few people willing to follow whatever harebrained ideas I’m coming up with, and actually understand them. When it came to this solution, their involvement ended up making the difference between success and failure.

I was pretty aware of the movement problems I was running into. There weren’t fundamental barriers to reaching sub 40 cycles, but I wasn’t moving things efficiently enough where it counts. I finished the solution I had been working on at 41 cycles, and let others have a look. An hour later, Grimmy shared a modification that hit 40. Then a few hours after that, 39 became a reality. Grimmy uploaded the following:

I definitely am not someone to gatekeep credit for achievements in these games. I want to make sure that the solutions don’t get incorrectly attributed to just one person. This led to my leaderboard philosophy. But in the history of Universal Solvent, it is a true statement that Grimmy was the first person to complete the puzzle in 39 cycles.

And it happened before the end of May 2020.

A Four Year Gap

In 2021, Grimmy assembled the list of remaining campaign and journal cycles, and sorted them into tiers of difficulty. Universal Solvent 38 was in the easiest tier, Tier 4. We figured that the general two-phase design that brought 39, would surely bring 38 if we just tried it again. There was no fundamental limit being hit, the puzzle was just complex.

The tiers were mentioned also in the Refined Bronze post, and readers may remember that only a single cycle was saved across the entire campaign and journal between those tiers and the start of 2024. It was not Universal Solvent.

2021-2023 had some absolutely stellar tournaments, weekly events, and was when this blog started. But campaign and journal cycles were not falling. That is, until 2024. This year has seen a resurgence in interest in main game cycles optimization. I’ve cut two cycles from Refined Bronze (Tiers 3 and 1). Grimmy cut the final cycle from Van Berlo’s Pivots (Tier 3). SpiritualShampoo cut the final cycle from Visillary Anaesthetic (Tier 2). And someone named Artem showed up, cutting the final cycle from Preservative Salt (Tier 2) on their very first post in the server.

Artem

We don’t know much about Artem. They do not post often, and have uploaded gifs of records only to disappear for a couple of days afterward with no words spoken. But solutions in Opus Magnum speak for themselves. “Showing your work” isn’t really needed, as long as the gif starts and ends on appropriate cycles.

What we do know about Artem is that they are a perfectionist, and an extremely skilled cycle optimizer. They took Preservative Salt down to 21 using a two-phase approach ending in a 2-cycle loop.

The design also features a very mild form of surgery with the first output being built with a defect and fixed up using a single duplicator. All this saying, they are capable of using prior art, whether because of studying it or arriving at it independently.

Today, Artem uploaded the gif I shared back at the start of this blog post. A 38 cycle universal solvent. They said no words before or since, and have yet to submit it to the leaderboard repository. But I’m going to applaud their achievement and do my best to explain what’s going on in the design!

Perfection

I refer to it as a 3 + 3. For the first 9 sets of inputs, the equivalent of one core is made every 3 cycles. For the final 9 sets of inputs, an output is made every 3 cycles.

Because 3 is an odd number, and the input speed is one per 2 cycles, odd and even numbered outputs are treated slightly differently from each other in a 3 + 3. During the final phase, you can see outputs are delivered in pairs, with the 2nd of each pair having the appropriately low latency. Additionally, the first output isn’t delivered directly, having a defect and requiring surgery. But the surgery makes complete sense in context. Mors in the lower right has an awkward travel path, and it’s better to match first mors to a later product saving the final mors for the first one.

Mitigating the Downsides of 3 + 3

To solve the problem of Berlo (which is even worse at 3 + 3 than it was in 4 + 2), Artem uses a system where fire and water atoms propagate from pre-existing fire and water atoms already on the board. The community usually calls this system “buddy duping”, and Rebix had a partial design for a 2 + 2 + 2 that relied heavily on buddy duping.

The air and earth atoms, however, are duped directly from Berlo with a different method for odd and even outputs. A different method is needed, because alternating cores are built with vitae and mors coming from completely different sides. They all add tin in the same place though, which is essential because there is only one source of lead in the puzzle. And in fact, the tin is also awkward at 3 + 3 compared to 4 + 2 because tin can only be made every 4 cycles. Artem makes a buffer of extra lead from the beginning so that when the tin is needed it can be produced every 3 cycles.

Reaping the Benefits of 3 + 3

What 3 + 3 buys you compared to 4 + 2, is even more travel latency. The reason we couldn’t push lower than 39 on the 4 + 2 design, was that the second number sets how much extra time you earned per output. With 5 outputs going out between the 6th phase 1 and the 6th phase 2, that amounts to 5 * 2 = 10 cycles. With 3 + 3, it’s 15 cycles.

We’ve been aware of this benefit for a while. A chat log from only 10 days ago, prompted by learning that Artem existed, discusses the possibility:

But even with us pooling our ideas, the one to actually put the whole thing together was Artem. And from all I can tell, it was done wholly independently. The buddy duping, the tin buffer, the surgery, and the viable 3 + 3 finisher that I couldn’t find. All now brought to life. It’s a wonderful sight to behold.

I’m certain that in the coming days, we will find some improvements to the cost and area secondary. At the moment, the 39c costs 1400g, while the 38c costs 3095g, making it the most expensive single cycle in the game. Perhaps the 38c of the future will be smaller, and thus more comprehensible. I wanted to get this story out in one day though. I want to remember, the 21st night of September.

Until next time.

Leave a Reply

Your email address will not be published. Required fields are marked *