I’m having fun building a visualization, so I’ve only finished part 1. It’s not about the leaderboard, right?
After messing with modulo 2’s, I didn’t have the nerves to sort out the cases occurring when running the CPU cycle-per-cycle while processing the input (actually it would be simple: one call to a “Run_Cycle” for “noop” and two calls for “addx”).
So, I have sacrified a few hundred bytes and stored there the operands. Thus, the VM runs after the program is loaded and it’s a bit cleaner.
I ignore the leaderboard score, too. IMHO it’s unfair because of timezones.
Again, I added a PPM output for part 2 (scaled and converted to PNG using GIMP):
Real data (this is a spoiler for the solution, so hidden):
If I understand you right (and I may not) my first attempt faltered on a similar issue; when I read in
addx, I had it set up to increment the cycles by 2. As a result, it skipped clean over the 20th cycle. I managed to make it work without storing the instructions.
Agreed. I’m pretty excited about each puzzle, so I stay up a bit late to complete it, but I wish it opened at a different time, or that the scoring weren’t based simply on who finished first.
I’m not sure how else he’d do it, though, on account of the contest’s strong social aspect, whcih he even encourages. He’d probably have to rethink the kinds of answers he accepts. Or, what if it started at midnight in a random time zone?
It’s not about the leaderboard, right?
Absolutely right!! I think it’s almost impossible to compete in the global leaderboard. Some people are using GPT-3 to create code and solve puzzles in seconds (e.g., see this reddit). I prefer to compete against myself creating simple programs that people can easily read and understand, or creating nicer visualizations.
With respect to the leaderboard I created, it’ just for fun, to keep track of submissions done in Ada/SPARK. So far we are 20 !! Let’s see the progress of so many gold stars in the upcoming days …
Remember to visit https://adventofcode.com/2022/leaderboard/private and use the code
1708445-6a8f7730 to join us.
My answer was PGPHBEAB. Different people get different input files which give different answers.