Monday, December 9, 2019

Advent Of Code 2017 - Day 7 yikes

I planned to blog about the solution after getting help from another Advent of Coder. She's tagged in the tweet below. However, I spent all day Saturday until a few minutes before Sunday, the 8th swatting bug including elementary stuff like reinitialization of objects in loops after the feedback was implemented. Thankfully that wasn't dependent on day 7. Jump to assumptions or full code
Well, this blog post is now a cry for help.

A few lines are based on assumptions so I'd like to highlight those.

  1. I stored the next index for each amplifier to continue from there without restarting from the beginning. I also tested starting from the first input index and that didn't work so I assumed that assumption was wrong
  2. I initially had a bug with the assumption that halts only occurred after an output opcode. That may still be true but in my debugging, I saw where using assumption 1 led to an exit after opcode 5 when a comparison with 0 resulted in a premature exit.
Please forgive the formatting and ancient look and feel. I'd migrated to Wordpress but lost that installation due to life happenings. I have been diagnosed with a mental illness but please read the following if you have the time, though it was written at a time a was slightly manic.
Perception and ignorance -  The main point is how some are perceived based on factors they have no control over, how these perceptions can be wrong and are sometimes based on ignorance.

No comments:

Post a Comment