DEV Community

JoeStrout
JoeStrout

Posted on

Advent of Code 2022 Wrap-Up

Last year, mid-November, I discovered the annual Advent of Code challenges. This is a fun event happens every December, with a programming challenge posted nightly every day from the 1st to the 25th. The challenges are interesting and varied, and form a story (of sorts) about Christmas elves and their adventures.

People all over the world give these challenges a try; nearly 250 thousand people completed at least the first challenge. Though we're all facing the same tasks, the input file — and therefore the correct answer — is unique to each player. So you can't just find the answers on the internet; you have to write some code. (And in fact each day has two versions of the task: a simpler version, and a more complex follow-on.)

I decided this would be a great chance to exercise MiniScript, a new(ish) scripting language designed to be particularly simple and clear. And so I did. I did early challenges in command-line MiniScript, but after a few days, switched to Mini Micro so I would have access to graphics and some handy libraries.

The result was, in short, a delight. I was able to solve both versions of all 25 tasks, and MiniScript held up like a champ. And in many cases, I was able to produce fun (or even useful!) visualizations of the problem and solution.

So, for posterity, here is a link to my write-ups of all 25 challenges from the 2022 Advent of Code.

  1. Snack Calories
  2. Rock Paper Scissors
  3. Rucksack Reorganization
  4. Camp Cleanup
  5. Supply Stacks — the first day I used Mini Micro
  6. Tuning Trouble — first time I got into the top 1000
  7. No Space Left On Device — solved two ways
  8. Treetop Tree House
  9. Rope Bridge Animated display of the example from Part B
  10. Cathode-Ray Tube Screen shot of display showing BPJAZGAP in block letters
  11. Monkey in the Middle
  12. Hill Climbing Algorithm
  13. Distress Signal — first time in the top 300
  14. Regolith Reservoir Particles of sand flowing into a series of obstacles
  15. Beacon Exclusion Zone Diagram of sensor areas
  16. Proboscidea Volcanium — first time I went to bed without a solution
  17. Pyroclastic Flow Blocks falling and stacking up in a pit.  Please turn your monitor sideways for proper viewing.
  18. Boiling Boulders and a follow-up
  19. Not Enough Minerals — my least satisfying solution
  20. Grove Positioning System — a hard lesson about making assumptions
  21. Monkey Math
  22. Monkey Map Image of complex path in blue, taken through a cubical map of light gray with brown obstacles.
  23. Unstable Diffusion Animation of elves spreading out over 10 rounds
  24. Blizzard Basin Visualization of elf party moving through a large field of moving obstacles
  25. Full of Hot Air — a blissfully simple final challenge.

I already wrote some final thoughts at the end of my Day 25 write-up. So, I'll just conclude here by saying that the exercise was both fun and useful, and I'm looking forward to playing again next year!

Top comments (1)

Collapse
 
sebnozzi profile image
Sebastian Nozzi

I find it impressive and inspiring to see how well MiniScript fared in solving all the challenges and how in combination to Mini Micro it was possible to produce nice visualizations.

It is a testament to the suitability of MiniScript in general, and the usefulness and fun-factor of Mini Micro.

Both were really battle-tested!