I saw that the best times (measured in cycles) were about twice as fast as mine. There must be something I was missing. And like much of SpaceChem, when I figured it out, it seemed so obvious. Clearly, to get a time that was twice as fast I needed to move two atoms at a time instead of one.
Like the previous attempt, to get the fastest time we'd use a straight line instead of a circuit. Each waldo would be responsible for assembling a nitrogen molecule and moving it across to the output. The two waldos would have to share the responsibility for bonding, inputting atoms and outputting molecules since we'd need to, for example, input a second nitrogen atom in the same cycle as bonding the first to it. To figure out the required placement of instructions we draw up a table and start filling in instructions.
We want red to drop its molecule last so that blue can output in the same cycle (red's instructions are carried out before blue's), so we have blue start building the first molecule on cycle 1.
Cycle | Blue | Red |
---|---|---|
1 | Grab | |
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | Drop | |
8 | ||
9 | ||
10 | ||
11 | ||
12 |
We then have to input the next atom and triple bond the molecule simultaneously, so constraining our options somewhat in cycles 2-4. Note that since red's instruction is run first, it has to run the in instruction before blue runs the bond+ instruction to ensure the atoms bond.
Cycle | Blue | Red |
---|---|---|
1 | Grab | |
2 | Bond+ | In |
3 | Bond+ | |
4 | Bond+ | |
5 | ||
6 | ||
7 | Drop | |
8 | ||
9 | ||
10 | ||
11 | ||
12 |
Red can't start building its molecule in cycles 3 or 4 because it leads to problems scheduling the in instructions. So the earliest we can start red's construction is in cycle 5.
Red's molecule also has to be assembled with an in instruction from red and three bond+ instructions, one of which must be run by red when blue is running its drop instruction.
Cycle | Blue | Red |
---|---|---|
1 | Grab | |
2 | Bond+ | In |
3 | Bond+ | |
4 | Bond+ | |
5 | Grab | |
6 | Bond+ | In |
7 | Drop | Bond+ |
8 | Bond+ | |
9 | ||
10 | ||
11 | Out | Drop |
12 |
Now because our waldos are following a back and forth route on a straight line, each waldo's instructions will be mirrored around their grab and drop instructions. Here blue's bond+ instruction in cycle 2 is already mirrored in cycle 6, however the out instruction in cycle 11 must be repeated in cycle 3. This forces red to do a bond+ in that cycle which is already mirrored in cycle 7. Red's in instruction in cycle 6 must be repeated in cycle 4. This forces blue to do a bond+ in that cycle which must be mirrored in cycle 10.
Cycle | Blue | Red |
---|---|---|
1 | Grab | |
2 | Bond+ | In |
3 | Out | Bond+ |
4 | Bond+ | In |
5 | Grab | |
6 | Bond+ | In |
7 | Drop | Bond+ |
8 | Bond+ | |
9 | ||
10 | Bond+ | |
11 | Out | Drop |
12 |
In addition, looking at cycle 2, blue's bond+ instruction must be repeated in cycle 12 and red's in instruction must be repeated in cycle 8. This forces blue to do a bond+ in cycle 8 which is already mirrored in cycle 6.
Cycle | Blue | Red |
---|---|---|
1 | Grab | |
2 | Bond+ | In |
3 | Out | Bond+ |
4 | Bond+ | In |
5 | Grab | |
6 | Bond+ | In |
7 | Drop | Bond+ |
8 | Bond+ | In |
9 | ||
10 | Bond+ | |
11 | Out | Drop |
12 | Bond+ |
Only thing missing now is an out instruction for blue's molecule dropped in cycle 7. We have to do this in cycle 9 else there will be a clash of molecules. It doesn't matter who runs this instruction so we give it to red. This out is mirrored in cycle 1.
Cycle | Blue | Red |
---|---|---|
1 | Grab | Out |
2 | Bond+ | In |
3 | Out | Bond+ |
4 | Bond+ | In |
5 | Grab | |
6 | Bond+ | In |
7 | Drop | Bond+ |
8 | Bond+ | In |
9 | Out | |
10 | Bond+ | |
11 | Out | Drop |
12 | Bond+ |
The two instruction lines are:
- Blue: grab, bond+, out, bond+, -, bond+, drop
- Red: grab, in, bond+, in, out, -, drop
There isn't space to position the waldo starts where we'd like on the paths, but we can position them off at an angle to run just the instructions we need to get started. The completed setup is below.
This reactor outputs 10 nitrogen molecules in just 59 cycles, less than half our previous attempt and snagging a spot in the top bar on the histogram.
No comments:
Post a Comment