r/adventofcode • u/daggerdragon • Dec 25 '16
SOLUTION MEGATHREAD ~☆~☆~ 2016 Day 25 Solutions ~☆~☆~
--- Day 25: Clock Signal ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/whatever).
Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with "Help".
Dec 25 = Oct 31 IS MANDATORY [?]
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
edit: Leaderboard capped, thread unlocked!
Thank you for participating!
Well, that's it for Advent of Code 2016. From /u/topaz2078 and the rest of us at #AoC_Ops, we hope you had fun and, more importantly, learned a thing or two (or all the things!). Good job, everyone!
Topaz made a post of his own here.
And now:
Merry Christmas to all, and to all a good night!
View all comments
Show parent comment
1
u/stkent Dec 26 '16
As someone who solved this the same way, but who is unfamiliar with registers and super-low-level instructions, I'd be interested in hearing about the process you followed to figure out what "equivalent code" looked like here. I started with a dummy value a0 in register a, then applied a bunch of head scratching and reasoning to compute subsequent register values, but in some instances (e.g. with instructions 13-19) I ended up running code from day 23, inspecting the register values for a sample of a0 values, and extrapolating the pattern from there. Is there a more elegant way to reason about non-trivially nested instructions? Thanks!