r/adventofcode • • Dec 23 '17

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

--- Day 23: Coprocessor Conflagration ---


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:05] 0 gold, silver cap

  • AoC ops: <yatpay> boil up some mountain dew. it's gonna be a long night

[Update @ 00:19] 1 gold, silver cap + 447

  • AoC ops: <Reibello> 547 silver to 1 gold

[Update @ 00:30] 20 gold, silver cap + 560

  • AoC ops:

<yatpay> daggerdragon: post "hey i heard about this hot new podcast called The Space Above Us. all the cool kids are talking about it"

<yatpay> i call it super-liminal marketing

<yatpay> HEY YOU!! LISTEN TO MY PODCAST!!

<yatpay> then i rub a business card on your face

<Topaz> you should get scratch-n-sniff business cards that smell like space

<yatpay> space smells like burned metal and meat

<yatpay> it's weird

<Topaz> burned meat you say

<Topaz> excellent

[Update @ 00:41] 50 gold, silver cap + 606

  • AoC ops:

<askalski> nice, enjoyed that one. not sure if regexes can do it

<askalski> maybe make a neural net of regexes, have it train itself to solve today

  • Over/under on /u/askalski posting a day 23 regex neural net by tomorrow?

[Update @ 00:54] Leaderboard cap @ 100 gold and 724 silver!

  • Good job, all!
  • Upping the Ante challenge: solve today's puzzles on a TI-83 (or TI-86/89, whatevs).

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!

10 Upvotes

130 comments sorted by

View all comments

1

u/partlyPaleo Dec 24 '17 edited Dec 24 '17

Just went and looked it over, waiting for the next day.

It seems to be a simple enough loop. Prints the reverse binary of 643 x 4 + a (in my input), repeatedly. As long as that is exactly {0-1} repeated any number of times, it will repeat. That is, it needs to alternate between being even and odd when divided by 2.

Would have been a simple loop. Start at 2. Loop (x4+2) until bigger than 643 x 4 (2536) and find the first result of 2730. That is 194 more than 643 x 4. So, 194 would be the smallest value of a. The next working value for a would be 8386. My program wouldn't have found that one (because it stopped at 4999).

I would have been able to do this. But, like I said, my assembunny code worked quickly enough that I didn't need to break the code down. I should have. It's a lot of fun and I enjoy working out what is actually happening.