Hacker News new | ask | show | jobs
by Snild 1299 days ago
Each year does vary slightly in theme and focus, so it's possible you'll have more fun this time if you give it another chance. Or not. But remember that it's never too late to give up. :)

My favorite so far is 2019, where several of the problems had you write and extend an emulator for the imaginary (and wacky) "IntCode" computer.

1 comments

2019 was excellent. Each day, the puzzle would have you adding new features (new instructions, addressing modes, input/output handling) to the emulator. The early days were fairly simple, but things got progressively more complicated. On one day the puzzle input was code that played a game of Breakout. Your task was to implement an emulated joystick that would play perfectly. The solution was the final score. On another day the puzzle required several virtual machines running in parallel feeding the output of one into the input of the next to get the final answer.

Reddit r/adventofcode is also fun. People post not only solutions in various languages, but visualizations of solutions (e.g., an animation of that game of Breakout). Sometimes people post fun things, like a solution to a puzzle in Apple II BASIC and a video of it running on an actual Apple II.

One of the things I really loved about the IntCode problems was best exhibited by that Breakout game. One way of solving the problem was to create a joystick, as you said, but if you had built an IntCode inspector/debugger, you could also dig into the game code itself (your puzzle input) and find out where the blocks were in memory, and how much each one was worth, and just sum it up directly.

It reminded me of Wastl's other big puzzle collection (Synacore) which also had a big emphasis on implementing a VM to host further puzzles on top of.

I like that solution by code-diving. I had initially rigged up a joystick for it, but programmed it to to play itself to completion.