SpaceChem - No Ordinary Headache (4186/1/68) - one reactor solution, annotated

755 views · Published 2 May 2011 · 1:44 · Indexed 14 November 2026

Channel: Chewable C++ · 2011 · Gaming

Watch on YouTube

NOTE: There are certainly far more efficient and better looking solutions out there.

This is my first attempt at solving this level. Figured I'd go straight for the 1 reactor solution. I haven't optimized for any other metric yet.

How I arrived at this solution:

Once you realize that you don't need to juggle all the pieces coming from the input, the solution is straightforward. There might be more crafty solutions out there, but here I went for the simplest solution that would work (tm) given the 1 reactor constraint.

I first came up with a simple algorithm, then implemented it. The algorithm is:

1. Wait for nitrogen. (use branch to discard oxygen)
1.a. Unbond it. (use syncs and the free waldo)
1.b. Discard extra nitrogen. (use free waldo)
2. Wait for oxygen. (use branch to discard nitrogen)
2.a. Undbond it. (use syncs and the free waldo)
2.b. Discard extra oxygen. (use free waldo)
3. Bond nitrogen and oxygen. (on the fly synchronized bonding is simple, since we only need two bonds)

More from this channel