Advent of Code 2022 Wrap-Up
Tags: miniscript, adventofcode, programming
Published: 2023-01-13 20:40:31

Last year, mid-November, I discovered the annual [Advent of Code](https://adventofcode.com/) 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](https://miniscript.org), a new(ish) scripting language designed to be particularly simple and clear.  And so I did.  I did early challenges in [command-line MiniScript](https://miniscript.org/cmdline/), but after a few days, switched to [Mini Micro](https://miniscript.org/MiniMicro/index.html) 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](https://dev.to/joestrout/advent-of-code-in-miniscript-day-1-2hf1)
2. [Rock Paper Scissors](https://dev.to/joestrout/advent-of-code-in-miniscript-day-2-46ca)
3. [Rucksack Reorganization](https://dev.to/joestrout/advent-of-code-in-miniscript-day-3-p44)
4. [Camp Cleanup](https://dev.to/joestrout/advent-of-code-in-miniscript-day-4-2kpj)
5. [Supply Stacks](https://dev.to/joestrout/advent-of-code-in-miniscript-day-5-46b5) — the first day I used Mini Micro
6. [Tuning Trouble](https://dev.to/joestrout/advent-of-code-in-miniscript-day-6-klg) — first time I got into the top 1000
7. [No Space Left On Device](https://dev.to/joestrout/advent-of-code-in-miniscript-day-6-4om7) — solved two ways
8. [Treetop Tree House](https://dev.to/joestrout/advent-of-code-in-miniscript-day-8-1hjf)
9. [Rope Bridge](https://dev.to/joestrout/advent-of-code-in-miniscript-day-9-24e4) ![Animated display of the example from Part B](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1km0zyaccncpnewpa8o.gif)
10. [Cathode-Ray Tube](https://dev.to/joestrout/advent-of-code-in-miniscript-day-10-1fp8) ![Screen shot of display showing BPJAZGAP in block letters](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8hve046w7smbr8lqqlj1.png)
11. [Monkey in the Middle](https://dev.to/joestrout/advent-of-code-day-11-in-miniscript-i5h)
12. [Hill Climbing Algorithm] (https://dev.to/joestrout/advent-of-code-in-miniscript-day-12-3ap5)
13. [Distress Signal](https://dev.to/joestrout/advent-of-code-in-miniscript-day-13-1d2a) — first time in the top 300
14. [Regolith Reservoir](https://dev.to/joestrout/advent-of-code-in-miniscript-day-14-5b40) ![Particles of sand flowing into a series of obstacles](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjrhbkilz1sf6943rwdz.gif)
15. [Beacon Exclusion Zone](https://dev.to/joestrout/advent-of-code-in-miniscript-day-15-faf) ![Diagram of sensor areas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r132qjhv8ns191shqpfy.png)
16. [Proboscidea Volcanium](https://dev.to/joestrout/advent-of-code-in-miniscript-day-16-29a) — first time I went to bed without a solution
17. [Pyroclastic Flow](https://dev.to/joestrout/advent-of-code-in-miniscript-day-17-2enf) ![Blocks falling and stacking up in a pit.  Please turn your monitor sideways for proper viewing.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aj9hfpuyyh1z5zlfgibf.gif)
18. [Boiling Boulders](https://dev.to/joestrout/advent-of-code-in-miniscript-day-18-3mn4) and a [follow-up](https://dev.to/joestrout/advent-of-code-day-18-follow-up-3nad)
19. [Not Enough Minerals](https://dev.to/joestrout/advent-of-code-in-miniscript-day-19-58d1) — my least satisfying solution
20. [Grove Positioning System](https://dev.to/joestrout/advent-of-code-in-miniscript-day-20-4ca) — a hard lesson about making assumptions
21. [Monkey Math](https://dev.to/joestrout/advent-of-code-in-miniscript-day-21-155m)
22. [Monkey Map](https://dev.to/joestrout/advent-of-code-in-miniscript-day-22-669) ![Image of complex path in blue, taken through a cubical map of light gray with brown obstacles.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2y20pazzjbgtfwl9d6lw.gif)
23. [Unstable Diffusion](https://dev.to/joestrout/advent-of-code-in-miniscript-day-23-2hb6) ![Animation of elves spreading out over 10 rounds](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/samzqjm8q17602ml7op6.gif)
24. [Blizzard Basin](https://dev.to/joestrout/advent-of-code-in-miniscript-day-24-44fe) ![Visualization of elf party moving through a large field of moving obstacles](https://miniscript.org/img/AoC-2022-Day24.webp)
25. [Full of Hot Air](https://dev.to/joestrout/advent-of-code-in-miniscript-day-25-hl4) — a blissfully simple final challenge.

I already wrote some final thoughts at the end of my [Day 25 write-up](https://dev.to/joestrout/advent-of-code-in-miniscript-day-25-hl4).  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!