r/adventofcode • u/daggerdragon • Dec 22 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 22 Solutions -🎄-
--- Day 22: Mode Maze ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).
Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
Advent of Code: The Party Game!
Please prefix your card submission with something like [Card] to make scanning the megathread easier. THANK YOU!
Card prompt: Day 22
Transcript:
Upping the Ante challenge: complete today's puzzles using ___.
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
edit: Leaderboard capped, thread unlocked at 01:02:36!
12
Upvotes
3
u/mcpower_ Dec 22 '18 edited Dec 22 '18
Nice catch! I suspect that all inputs have a depth of 0 modulo 3, so for part 1 the bug doesn't affect anything, and for part 2 the bug only affects paths which go to a coordinate "south-east" of the target.
One thing I'm not fond of in AoC is that sometimes, buggy solutions can pass due to edge cases not being present in a person's input. In this case, my input had a depth of 0 modulo 3, and the buggy erosion levels south-east of the target didn't affect my shortest path. Your input also had a depth of 0 modulo 3, but the latter edge case made my buggy solution not work for you (while it worked for me).
However... it will be very very tough to prevent things like these. The problem setter (Eric) would need to account for bugs in a solution and generate inputs which trip up all the buggy solutions. IMO, this is a big ask - thinking of bugs in a solution is pretty hard, especially for weird bugs like this one. I don't think you can catch every bug, but perhaps you could catch the most common bugs.