Advent of Code
Advent of Code 2022, Day 11
So, now that you’re foraging through the jungle alone, you have discovered that Monkeys have stolen your items and are tossing them around. Use MATH to build a shotgun out of bamboo reeds and vines and stop the Monkeys! No wait, that’s not friendly. Instead maybe calculate the rounds your items spend being tossed around based on some Mysterious Monkey Criteria and try to get your items back. There is probably some easy library to …
Advent of Code 2022, Day 10
Wheeeeee another Easy Mode/Hard Mode day. Ok, the hard mode is, debatable-ish. It was pretty tedious to get working, though the basic idea was pretty obvious. Today’s puzzle, the communicator from a previous puzzle is broken, and the screen needs fixed. So you get an input of data off the broken communicator. For Part 1, you find some totals of the fluctuating signal level and add them up for a solution. Pretty simple honestly. Then …
Advent of Code 2022, Day 9
Things are getting tricky here now on Day 9, though not excessively hard. Just hard-ish. Today’s puzzle involves rope simulations. The data set consists of movement for the head of the rope and the end of the rope (and subsequent segments) follows rules that essentially keep the tail near the head. For example, if the head moves right 4 spaces, the tail follows, moving right 4 spaces. The tally was how many locations on a …
Advent of Code 2022, Day 8
Today’s puzzle involved a forest of trees, and evaluating the heights of trees in that forest. For the sake of coding simplicity, the trees are a nice grid, which makes it an easy 2 dimensional matrix. This was my biggest hang up in designing a solution, Because Python handles 2 dimensional matrices as a “list of lists”. Which means often, the x and y coordinates need “flipped” when referenced, which often screws me up. This …
Advent of Code 2022, Day 7
So, this one was the first one so far that was tricky. Even though it’s not really that hard, I had actually already planned it out for the most part from just reading the prompt. You essentially get a series of Command Line commands and files with sizes, and have to move around a file system adding up numbers (file sizes). I built a dictionary to track the total file size for the directories, and …
Advent of Code 2022, Day 6
Day 6 – Fixing the Communicator I’m not real sure what’s up here, but today’s project was easy. Like… stupidly easy. Maybe it’s just something better suited to how Python Handles data? The Part 2 was even easier. It literally just involved duplicating the same function, changing one number, and running the code. The Problem Part 1: As you move through the dense undergrowth, one of the Elves gives you a handheld device. He says …
Advent of Code 2022, Day 5
Day 05 – Moving Crates The Problem Part 1: The expedition can depart as soon as the final supplies have been unloaded from the ships. Supplies are stored in stacks of marked crates, but because the needed supplies are buried under many other crates, the crates need to be rearranged. The ship has a giant cargo crane capable of moving crates between stacks. To ensure none of the crates get crushed or fall over, the …
Advent of Code 2022, Day 4
Day 4 – Cleaning Up The Landing Zone The Problem Part 1: Space needs to be cleared before the last supplies can be unloaded from the ships, and so several Elves have been assigned the job of cleaning up sections of the camp. Every section has a unique ID number, and each Elf is assigned a range of section IDs. However, as some of the Elves compare their section assignments with each other, they’ve noticed …
Advent of Code 2022, Day 3
Day 3 – Sorting the Food Into Sacks The Problem Part 1: One Elf has the important job of loading all of the rucksacks with supplies for the jungle journey. Unfortunately, that Elf didn’t quite follow the packing instructions, and so a few items now need to be rearranged. Each rucksack has two large compartments. All items of a given type are meant to go into exactly one of the two compartments. The Elf that …
Advent of Code 2022, Day 2
Day 2 – Cheating at Rock Paper Scissors The Problem Part 1: The Elves begin to set up camp on the beach. To decide whose tent gets to be closest to the snack storage, a giant Rock Paper Scissors tournament is already in progress. Rock Paper Scissors is a game between two players. Each game contains many rounds; in each round, the players each simultaneously choose one of Rock, Paper, or Scissors using a hand …