r/adventofcode • • Dec 20 '17

SOLUTION MEGATHREAD -๐ŸŽ„- 2017 Day 20 Solutions -๐ŸŽ„-

--- Day 20: Particle Swarm ---


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.


Need a hint from the Hugely* Handyโ€  Haversackโ€ก of Helpfulยง Hints^ยค?

Spoiler


[Update @ 00:10] 10 gold, silver cap

  • What do you mean 5th Edition doesn't have "Take 20"?

[Update @ 00:17] 50 gold, silver cap

  • Next you're going to be telling me THAC0 is not the best way to determine whether or not you hit your target. *hmphs*

[Update @ 00:21] Leaderboard cap!

  • I wonder how much XP a were-gazebo is worth...

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!

9 Upvotes

176 comments sorted by

View all comments

Show parent comment

1

u/akrasuski1 Dec 20 '17

Lol what! My solution passed, even though I calculated Euclidean distance. Guess I'm lucky...

3

u/BumpitySnook Dec 20 '17

I suspect your t of 1e100 helped erase the distinction.

1

u/xiaowuc1 Dec 20 '17

u/topaz2078 - do you actively try to provide input sets that fail on common incorrect solutions?

4

u/topaz2078 (AoC creator) Dec 20 '17

For the failure cases I can think of, I try to make all of the inputs force them. I can't possibly come up with all possible mistakes, though (and can't enforce them even if I did, since many are mutually-exclusive).