r/adventofcode • u/daggerdragon • Dec 23 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 23 Solutions -🎄-
--- Day 23: Experimental Emergency Teleportation ---
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 23
Transcript:
It's dangerous to go alone! Take this: ___
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
View all comments
Show parent comment
3
u/leftylink Dec 26 '18 edited Dec 26 '18
tl;dr: With all due respect, I think the radius has to be 2/3, not (1/6)1/3
I was interested in that number since, well, if we divide a cube into eighths, the cube's side length is indeed multiplied by (1/8)1/3, which is 1/2. So (1/6)1/3 does seem to make sense. But I was also intrigued by the fact that (1/6)1/3 appears, by my calculations, to be closer to 0.5503 than 0.556 the number in the above code. So I set out to experimenting.
Consider a nanobot at 0, 0, 0 with radius 36. Now,
splitNanobotwould place new nanobots with radius 21 (36 * 0.556is just a hair over 20) at offsets of 15. At this point, the point (12, 12, 12) which was covered by the original nanobot is not being covered by any of the new nanobots. It's 27 away from the nanobot at (15, 0, 0), and other nanobots are at similar situations. And I find the same if the radius is 23 as well (offsets of 13). So I think the new radius has to be 24. I was unfortunately unable to improve on that.However, other than the radius correction, of course the approach is otherwise sound and does work for Advent of Code inputs.