Advent of Code - Day 16

Note: This topic is to talk about Day 15 of the Advent of Code.

For general discussion about the Advent of Code 2018 and links to topics of the other days, see this topic.

After Day 15 it was a relief to find that Day 16 was relatively straightforward.

I started by putting all implementations of all instructions in a separate Machine module, adding a code example for each instruction. That way, I could run the tests and be reasonably sure that I didn’t have any silly bugs in the instructions before starting the work on the puzzle solving code itself.

Here is my solution.

3 Likes

This is my solution. I agree that today’s challenge was much simpler than day 15. The most interesting thing for me was computing the mapping of opcodes to instructions.

2 Likes

Day 16 was fun! Here’s my solution:

Here’s a video of me creating it (available for 14 days):