wolfgang ziegler


„make stuff and blog about it“

Advent of Code 2022

January 17, 2023

I know this blog post comes a bit late, but Advent of Code 2022 is a wrap now and it was just as fun and challenging as the years before.

Here's the GitHub repo with my solutions to the puzzles.

It took me a bit more time this year to actually finish all the puzzles. Some of them were really time-consuming and I had other things on my mind. But in the first week of January I managed to collect all the remaining stars 🌟.

My 50 stars for Aoc 2020

As usual, let me highlight a few of the puzzles that I found especially interesting and/or hard.

Day 17: Pyroclastic Flow

This day was basically about implementing a simple game of Tetris. The solution to the second part of the puzzle was to look for a visual pattern in the tower and solve it via a simple div/modulo calculation.

Looking for patterns in the Tetris pieces

Day 19: Not Enough Minerals

This puzzle was the worst 😱 and the only one for which I need a few hints.

These hints did the trick though:

  • Always build a Geode robot and ignore other options in that case.
  • Skip states after a certain amount of time.

With that I was able to solve it in an admittedly not great, but acceptable runtime.

29: 14
30: 0
Total quality level: 1466
max: 33
max: 10
max: 25
Result: 8250
END (after 161.0814019 seconds)

Day 22: Monkey Map

This puzzle was actually fun, but it took me quite some time to get it right. Even though it was obvious what to do in the second part, it took me hard concentration and focus to wrap my had around the problem and find/fix all the bugs I had made underway.

Also, I needed some visual clues 😉.

I color the 2D map first (left: sample map, right: the actual puzzle input).

Coloring the 2D map

Then I made up cube with the matching colors to get the wrap-around rules (orientation, position) correct.

Using a colored cube for help

Day 24: Blizzard Basin

This puzzle also took me a while. As so often with these mazes, it was about finding the right caching strategy to avoid looking into too many paths. But then, the whole puzzle ran in a bit more than a minute.

START Day24

.
.
.

Reached the goal in 934 (334 + 309 + 291) minutes.
END (after 80.9290695 seconds)

And that was it for Advent of Code 2022.

Done

I managed to extend my "stars collection" to 400!

My total of 400 stars.